Forum Discussion
Need Help with Dax
- 9 years ago
Hey,
Basically you can achieve what you on two ways:
- change the interaction between the time slicer and your kpi visual
- calculate a independent measure like this
mspassindependent = calculate(
sum('tablename'[measurename],
all('tablename'[nameofthedatecolumn])
)
- 9 years ago
Please provide the numbers you want to use to calculate the kpi and the result you expect
- 9 years ago
Wrap it in calculate and remove the date filter for total unique cases executed.
Total Unique Cases Executed = CALCULATE([Unique Cases Executed], ALL('Date'[Date]))
That removes the date filter. If you need to reapply the date filter to maintain a certain year or month you can add that back in calculate.
Then use the Total Unique Cases Executed to calculate your percentage instead.
You will need a date table. I am assuming you have one and it is called Date in my measure example.
In the above pic.. Last column ( yellow ) gives us Pass Percentage..
79% is coming because it calculates = 41 (pass) / 52 (Unique Cases Executed ) - both in blue
But the expected value is :
37% based on calculation 41(Pass) / 109 (Total Cases Executed ).
Wrap it in calculate and remove the date filter for total unique cases executed.
Total Unique Cases Executed = CALCULATE([Unique Cases Executed], ALL('Date'[Date]))
That removes the date filter. If you need to reapply the date filter to maintain a certain year or month you can add that back in calculate.
Then use the Total Unique Cases Executed to calculate your percentage instead.
You will need a date table. I am assuming you have one and it is called Date in my measure example.
- cshashank9 years agoFrequent Visitor
Thanks Kcantor, TomMartens for the solution.
The mistake I did while trying TomMartens solutions was to use Sheet1[Date].[Date] instead of Sheet1[Date]
Thank you for your time.