Forum Discussion
AndrewPF
Helper V
3 years agoWhy does a slicer not affect a measure?
I have the following measure:
Risks In Progress = if(calculate(sum('Risks Registers'[Risk Count]), 'Risks Registers'[workflowStageName] <> "Closed") = 0, 0, calculate(sum('Risks Registers'[Risk Count]), 'Risks Registers'[workflowStageName] <> "Closed"))
in a card.
I have a slicer for workflowStageName.
For some reason, the slicer has no effect on the card. Whatever I select, the value in the card remains the same.
I have checked the interactions and they're all "on".
Have I made an error in my DAX code?
Have I misunderstood the way slicers work?
2 Replies
- amitchandak
Super User
AndrewPF , Not very clear. Try measure like
calculate(sum('Risks Registers'[Risk Count]), filter('Risks Registers', 'Risks Registers'[workflowStageName] <> "Closed"))
If this does not help
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data. - AndrewPF
Helper V
It works, thanks.
But what is the difference between the two measures?
In the measure:
calculate(sum('Risks Registers'[Risk Count]), 'Risks Registers'[workflowStageName] <> "Closed")
my understanding was that the part highlighted in red is the filter. What does the word "filter" do?