Forum Discussion
Measure based on Multiple Slicer Selection
- 1 year ago
Hi,
I am not sure if I understood your question correctly, but please try something like below and check whether it works.
If you are using ALL DAX function in one of your measures, please try using ALLSELECTED DAX function.ALLSELECTED function (DAX) - DAX | Microsoft Learn
expected result measure: = VAR _failcount = [failcount measure] VAR _allitemcount = CALCULATE ( [itemcount measure], ALLSELECTED () ) RETURN DIVIDE ( _failcount, _allitemcount )
Hi,
I am not sure if I understood your question correctly, but please try something like below and check whether it works.
If you are using ALL DAX function in one of your measures, please try using ALLSELECTED DAX function.
ALLSELECTED function (DAX) - DAX | Microsoft Learn
expected result measure: =
VAR _failcount = [failcount measure]
VAR _allitemcount =
CALCULATE ( [itemcount measure], ALLSELECTED () )
RETURN
DIVIDE ( _failcount, _allitemcount )
Thank you! That mostly solved the problem, however now I am worried that the filters aren't working correctly. I have 2 tables, one contains the fails and the other contains the total items. Each have the field that I want to filter on, but the tables are not linked. (They are related to a common date table for date filtering currently) Does this ALLSELECTED work in this case? It seems to be only letting the slicer filter the table that it is currently located in (in this case my fail table).
- Jihwan_Kim1 year ago
Super User
Hi,
Thank you for your message, and if it is OK, please share your sample pbix file's link (Onedrive link, or Dropbox link, or others), and then I can try to look into it to come up with a proper solution.
Thank you.