Forum Discussion
Not able show dates in my visual without data
I have a line graph visual that uses my mannually created calendar table (Hierarchy) and Data from another Table to show the average sessions over the period. However, as you can see when you drill down into the graph, only dates with data are being shown. This means I am not getting accurate data cause it is not taking the average of everyday of that month. The thing is I am fine with dates with no data not showing on 99% of my other visuals but for this visual in particular it is important for that full picture.
How can I show all dates in there even if there is no data for that given day?
My formula and followings below:
I have set a Many to one relationship the Start Date in the raw data table to the Calendar [Date]. If anyone could help with something I may be missing I would really appreciate that.
I have found a solution DAX to show any blanks as 0!
AverageWithoutZero =VAR CalculatedAverage =AVERAGEX(SUMMARIZE('Pogo E Connect Data','Calendar'[Year],'Calendar'[Quarter]),CALCULATE(AVERAGEX(CALCULATETABLE(SUMMARIZE('Pogo E Connect Data','Calendar'[Month],'Pogo E Connect Data'[Charger Type]),CROSSFILTER('Pogo E Connect Data'[Start Date], 'Calendar'[Date], BOTH)),CALCULATE(AVERAGEX(VALUES('Calendar'[Date]),COALESCE([SDR ID average per CP ID], 0))))))RETURNIF (ISBLANK(CalculatedAverage),0,CalculatedAverage)
3 Replies
- AnonymousNot applicable
have you tried adding
Average Number of Sessions = AVERAGEX( VALUES('Calendar'[Date]), CALCULATE( AVERAGEX( SUMMARIZE(
- SemaD_Regular Visitor
I tried your suggestion but unfortunately the results of the visual still excludes dates without data😣
- SemaD_Regular Visitor
I have found a solution DAX to show any blanks as 0!
AverageWithoutZero =VAR CalculatedAverage =AVERAGEX(SUMMARIZE('Pogo E Connect Data','Calendar'[Year],'Calendar'[Quarter]),CALCULATE(AVERAGEX(CALCULATETABLE(SUMMARIZE('Pogo E Connect Data','Calendar'[Month],'Pogo E Connect Data'[Charger Type]),CROSSFILTER('Pogo E Connect Data'[Start Date], 'Calendar'[Date], BOTH)),CALCULATE(AVERAGEX(VALUES('Calendar'[Date]),COALESCE([SDR ID average per CP ID], 0))))))RETURNIF (ISBLANK(CalculatedAverage),0,CalculatedAverage)