Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hello!
I have a measure to calculate fail rate. Right now it is actually a couple of measures: one counting all the fails, one counting the total items, and a third that does the calculation to turn the first two into a fail rate.
What I need to be able to do is have the users select their departments in the slicers and have the measures change to only calculate the fail rate for those departments. I have found a solution using IF ISFILTERED and SELECTED VALUE
Solved! Go to Solution.
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 @aallman ,
We haven't heard back from you regarding our last response and wanted to check if your issue has been resolved.
If our response addressed your query, please mark it as Accept Answer and click Yes if you found it helpful.
If you have any further questions, feel free to reach out.
Thank you for being a part of the Microsoft Fabric Community Forum!
Hi @aallman ,
I just wanted to kindly follow up to see if you had a chance to review the previous response provided by community members. I hope it was helpful. If yes, please Accept the answer so that it will be helpful to others to find it quickly.
Thank you.
Hi @aallman ,
May I ask if you have gotten this issue resolved?
If it is solved, please mark the helpful reply or share your solution and accept it as solution, it will be helpful for other members of the community who have similar problems as yours to solve it faster.
Thank you.
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).
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.
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
22 | |
7 | |
6 | |
6 | |
6 |
User | Count |
---|---|
27 | |
12 | |
10 | |
9 | |
6 |