Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
8 years ago
Solved

Show items with no data in selected date period

I have some charts where there is no data for all the months, but i still want to have these months shown, e.g last 12 months when i select show items with no data and add a data filter to show the l...
  • Seward12533's avatar
    8 years ago

    Hi, you need to force a zero to be displayed instead of null if no results and then limit what gets displayed so you don't show all values in your date table/range.  Lots of ways to do this. 

     

    Here is what I do to force zero results. 

     

    Result with Zero = VAR result = [Measure or Calc] RETURN 
    IF(result,result,0)

    You can then use the Visual Filters to limit to last 12 Months, 12, Weeks or whatever or use some other blocking function to only show this result if there data in anotehr measure. 

     

    See this example I built for someone else that domonstrates this principle in this case I'm using a visual filter to only display resultls where there is actual data. 

     

    https://1drv.ms/u/s!AuCIkLeqFmlhhJh3pj3q9XzrxpxAng

     

  • Seward12533's avatar
    Seward12533
    8 years ago

    Can you share example? Do you have a date table?

     

    Once you have your graph showing all time when you select the all values even with zero.  Filter the visual based on relative dates (see snip below)