Forum Discussion
Line Chart showing Prior dates
Hi,
I'm trying to create a Line Chart to show the Average and also the UCL and LCL.
To calculate this, I have the following metric:
[No. of Incidents]
[Incident_Month_Year]
I also have some additional columns as well, but they aren't relevant.
I calculate the No. of Observed Months:
Observations Tot Incidents = CALCULATE( DISTINCTCOUNT('Table1'[Incident_Month_Year]),ALLEXCEPT('Table1',[Incident_Month_Year]))
Which I use to to draw out the Average No. of Incidents Per Month
Avg Cnt Incidents = CALCULATE(sum('Table1'[Tot_#_Incidents])/[Observations Tot Incidents], ALLEXCEPT('Table1','Table1'[Incident_Month_Year]))
Unfortunately, when I lay out the above onto a line chart, i see that the Avg Cnt Incidents and Observation Tot Incident Measures have extended themselves to dates prior to what I have in [Incident_Month_Year].
Is there any way to filter out my DAX correctly to only show those months which have data?
Hi Anonymous
insert your DAX calculation (for Observations Tot Incidents) in this IF statement.
[Observations Tot Incidents] =
IF ( ISBLANK ( [Tot_#_Incidents] ), BLANK (), <DAX for Observations Tot Incidents> )If I answered your question, please mark my post as solution, this will also help others.
Please give Kudos for support.
8 Replies
- mwegenerMost Valuable Professional
Hi Anonymous ,
at first try to change this...
Avg Cnt Incidents = CALCULATE(DIVIDE(sum('Table1'[Tot_#_Incidents]),[Observations Tot Incidents]), ALLEXCEPT('Table1','Table1'[Incident_Month_Year]))- AnonymousNot applicable
Hi mwegener ,
Made the changes, but still no changes in the Line Chart as it still is showing information to Jan 2018. My data only goes back to June 2018!
- mwegenerMost Valuable Professional
Hi Anonymous ,
could you give an overview of your model and the values on your line chart?