Forum Discussion

AndrewPF's avatar
AndrewPF
Icon for Helper V rankHelper V
3 years ago

Why 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

  • 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.

  • 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?