Map a zero value for weeks that don't have data

Rvannoy
Rvannoy Member
edited March 2023 in Datasets

when I select a range of dates for say 4 weeks I need it to pull the data for all the weeks even if we did not have any shipments. It is only pulling in weeks that we had shipments. How do I get it to pull in all the weeks in the range I chose on the date selector on my dashboard?

Answers

  • We already have the data on the data set grouping by week.

  • HI @Rvannoy

    You'll need to have data for those weeks in your dataset in order for Domo to pick them up. What I recommend is using the Domo Dimensions connector - Calendar dataset and left join your dataset to that specific one on a daily basis - then you can use a COALESCE on your field to default it to 0 for that week. It's similar to the design philosophy I've written up previously here: https://dojo.domo.com/discussion/53481/a-more-flexible-way-to-do-period-over-period-comparisons#latest

    You'd essentially just use the 'Current' period type that's configured in your dataset. Plus this will set you up to easily to Period over Period comparisons.

    **Was this post helpful? Click Agree or Like below**
    **Did this solve your problem? Accept it as a solution!**
  • @GrantSmith I will try this and let you know how it goes.

  • @GrantSmith Thank you this worked

  • Glad this worked out for you @Rvannoy . Can you make sure to accept the answer so that others can more easily find this in the future?

    **Was this post helpful? Click Agree or Like below**
    **Did this solve your problem? Accept it as a solution!**