Forum Discussion
Calculated Columns Affected By Slicer Filters
- 3 years ago
csaethre19
I understood you wanted the overall for a day, Just do the below changes to the measures.
TotalRuns_Test =
CALCULATE (
DISTINCTCOUNT ( 'Test'[Experiment Id] ),
ALLEXCEPT ( Test, Test[Experiment Start Time] )
)FailureRate_Test = [FailureCount_Test] / [TotalRuns_Test]
Regards,Naveen
Hello csaethre19
Calculated columns cannot alter its calculation based on a slicer from report view. Create these same calculations as measure. That will work fine.
Let me know if this helps!
If this post helps, then please consider Accept it as the solution to help the others find it more quickly. Appreciate you kudos!!
- csaethre193 years agoHelper II
Okay. Can you maybe point me in the right direction on how to accomplish a failure rate measure?
So far I have these measures:
Measure_FailureCount = COUNT('public failure'[Failure Mode])andMeasure_TotalRuns =CALCULATE(DISTINCTCOUNT('public failure'[experimentId]),REMOVEFILTERS('public failureMode'[Failure Type], 'public failureMode'[Designation]))I need a third measure to calculate the failure rate based on these two measures.I have this:Measure_FailureRate = [Measure_FailureCount] / [Measure_TotalRuns]However, when I graph this failure rate vs. Experiment Start Time on a line chart and set the Legend to Failure Mode I get incorrect values. It appears to be dispalying just the Failure Count multiplied by 100. It does not consider the divide by total runs per day.Here are some screenshots of some data I am looking at:As you can see from the table on May 1st I should show 20% for the failure mode in blue.
- NaveenGandhi3 years agoMemorable Member
Can you provide sample data to understand the problem better, please make sure you include all the columns that will be required for calculation and visualisation.
Regards,
Naveen
- csaethre193 years agoHelper II
https://drive.google.com/file/d/10tOYSEt6w-_WfEBi6L-oaamE1il9c6ws/view?usp=sharing
I have shared the .pbix file that is a simple idea of what I am trying to do. When setting the legend on the failure rate graph to failure mode you get incorect rates for each mode on each day. Something similar is happening in my real data set when I have these same measures.