Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Line Chart not plotting for all Dates

Hi,

 

I have the following measure that calculates an InjuryRate

InjuryRate = Calculate(Countrows(IncidentReports);IncidentReports[Incident Classification]="XYZ")*1000000/[TotalManHour]

 

So, the InjuryRate values is unique for each date, as the TotalManHour value changes every day. When I put the InjuryRate measure on a Card, the value updates every time I change the date slider. So, there are no problems in calculating this measure and showing the most updated value on a card.

 

Now, I would like to plot the InjuryRate measure againt time on a line chart. However, the InjuryRate does not calculate for each date value. Instead, it only calculates the value for the two dates that have en entry with Incident Classification=‘XYZ’ and draws a straight line between these two points.

 

How can I make sure that in the line graph, the InjuryRate measure calculates for each date value?

 

If it helps, have the following tables:

  • A 'DateTable' table with a [Date] column.
  • An 'IncidentReports' table with a [Date of Incident] column. The [Date of Incident] is linked to the [Date] column of the 'DateTable'.
  • A 'Manpower Summary' with a [Date] column that is used to calculate the [TotalManHour] measure. The Manpower Summary[Date] is again linked to the [Date] column of the 'DateTable'.
  • hi Anonymous 

    If so, you may try this formula instead of [TestMeasure]

    New TestMeasure = CALCULATE([Long Time Injury Frequency Rate],FILTER(ALL(APier_DateTable),APier_DateTable[Date]<=MAX(APier_DateTable[Date])))

    Please replace ',' with ';' when your copy the formula.

     

    Regards,

    Lin

7 Replies