Forum Discussion

csaethre19's avatar
csaethre19
Helper II
3 years ago

Data for Measure Changes when Legend is Set

I am using measures to calculate a failure rate and display it on a line chart. I want this line chart to have its legend set by a field called failure mode. The two measures I have to calculate the failure rate measure are:

 

Measure_FailureCount = COUNT('public failure'[Failure Mode])
and
 
Measure_TotalRuns =
CALCULATE(
    DISTINCTCOUNT('public failure'[experimentId]),
    REMOVEFILTERS('public failureMode'[Failure Type], 'public failureMode'[Designation])
)
 
When I do not have the legend set to failure mode, I get correct (accumulative) failure rates for each day. 
When I set the legend to failure mode I expect that it will calculate per failure mode the failure rate per day based on the total runs measure for that day.
 
However, it appears that when the legend is set, the total runs changes and I get inaccurate failure rates per failure mode.
I am wondering why does this happen and how can I fix this?
 
 

The first data point in this line chart should be 20%, etc.

 

The following link is to a .pbix file that has a sample report/data that shows what I am talking about:

https://drive.google.com/file/d/10tOYSEt6w-_WfEBi6L-oaamE1il9c6ws/view?usp=sharing 

2 Replies