Forum Discussion
Modify Created Measure to Ignore a Page Slicer
Hi,
I have a Created Measure that is working correctly [Asthma M%]. However, I need to create an additional created measure that is essentially the same...but that ignores the Page Slicer [Group_ID].
Here is my existing Created Measure:
Anonymous , Try like
Asthma M% = CALCULATE(DIVIDE(CALCULATE(DISTINCTCOUNT('Data Files'[MBR_ID]), Filter('Data Files','Data Files'[Asthma_IND] = "Asthma")),(CALCULATE(DISTINCTCOUNT('Data Files'[MBR_ID])))), all(Table [Group_ID]))But if it is page level filter , than I doubt it will work
2 Replies
- amitchandak
Super User
Anonymous , Try like
Asthma M% = CALCULATE(DIVIDE(CALCULATE(DISTINCTCOUNT('Data Files'[MBR_ID]), Filter('Data Files','Data Files'[Asthma_IND] = "Asthma")),(CALCULATE(DISTINCTCOUNT('Data Files'[MBR_ID])))), all(Table [Group_ID]))But if it is page level filter , than I doubt it will work
- jdbuchanan71
Super User
Anonymous
You have a bit of extra code in your first measure and you should avoid filtering an entire table and just filter the column you need, like so.
Asthma M% = DIVIDE ( CALCULATE ( DISTINCTCOUNT ( 'Data Files'[MBR_ID] ), FILTER ( VALUES ( 'Data Files'[Asthma_IND] ), 'Data Files'[Asthma_IND] = "Asthma" ) ), DISTINCTCOUNT ( 'Data Files'[MBR_ID] ) )Then, for the all groups version you could do.
Astma M% All Groups = CALCULATE ( [Astma M%], ALL ( 'Data Files'[Group ID] ) )