Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers!
Enter the sweepstakes now!See when key Fabric features will launch and what’s already live, all in one place and always up to date. Explore the new Fabric roadmap
I have a simple column of values and I want to use a calculated column to determine if those values PASS or FAIL. However, I want to be able to change the minimum pass value and maximum fail value by using a slicer. When I put fixed numbers in the formula, the column values are shown appropriately; but, it has to be changed by editing the formula if I want to raise or lower minimum and maximum pass/fail values. I want to be able to change it using a slicer.
WORKING:
Not working:
Result = IF('t1'[Column1]>='Pass parameter'[Pass parameter Value],"PASS",IF('t1'[Column1]<='FAIL parameter'[FAIL parameter Value], "FAIL", "UNDETERMINED"))
I read a lot that PowerBI isn't capable of dynamically caluculating a column. I realize that PowerBI might not be capable of doing EXACTLY what I want here, but there has to be some sort of workaround that allows me to change the column values with a slicer.
Solved! Go to Solution.
hi, @Anonymous
First, you must know that calculated column and calculate table can't be affected by any slicer.
Notice:
1. Calculation column/table not support dynamic changed based on filter or slicer.
2. measure can be affected by filter/slicer, so you can use it to get dynamic summary result.
here is reference:
https://www.sqlbi.com/articles/calculated-columns-and-measures-in-dax/
Second, you could use a measure instead of it by this formula
Measure Result = IF(SUM(t1[Column1])>=[Pass parameter Value],"PASS",IF(SUM(t1[Column1])<=[FAIL parameter Value],"FAIL","UNDETERMINED"))
Result:
By the way: You need to set Column1 is "Don't Summarize"
Best Regards,
Lin
hi, @Anonymous
First, you must know that calculated column and calculate table can't be affected by any slicer.
Notice:
1. Calculation column/table not support dynamic changed based on filter or slicer.
2. measure can be affected by filter/slicer, so you can use it to get dynamic summary result.
here is reference:
https://www.sqlbi.com/articles/calculated-columns-and-measures-in-dax/
Second, you could use a measure instead of it by this formula
Measure Result = IF(SUM(t1[Column1])>=[Pass parameter Value],"PASS",IF(SUM(t1[Column1])<=[FAIL parameter Value],"FAIL","UNDETERMINED"))
Result:
By the way: You need to set Column1 is "Don't Summarize"
Best Regards,
Lin
User | Count |
---|---|
88 | |
74 | |
69 | |
59 | |
56 |
User | Count |
---|---|
40 | |
38 | |
34 | |
32 | |
28 |