The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
I have a table that shows the following data:
laundry name- total orders- placed orders -successful orders- success rate[overall] %,success rate %
where the success rate[overall] is a measure calculated by : [Successful Orders]/[Total Orders]
and the success rate is a measure too that is calculated by:[Successful Orders]/[Placed Orders]
i need to create a benchmark or a (% selector) where for example, if i select >=50% it will show me data in the table when success rate and success rate[overall] greater than or equal to 50 or if i select <50% it will show me data when success rate and success rate[overall]is below 50%
note:1- overall orders,successful orders,placed orders are also a measuers created by counting the "orderID" from orders table where each of the three has a different status.
2- this table is filtered by "country name" from countries table, "order date" from orders table,"laundry name" from laundries table.
laundry name | total orders | placed orders | succussful orders | success rate[overall] % | success rate % |
laundry 1 | 203 | 185 | 162 | 80% | 87.57% |
laundry 2 | 201 | 180 | 161 | 80% | 89.44% |
laundry 3 | 185 | 164 | 140 | 76% | 85.37% |
laundry 4 | 172 | 161 | 150 | 87% | 93.17% |
laundry 5 | 205 | 183 | 148 | 72% | 80.87% |
laundry 6 | 211 | 193 | 174 | 82% | 90.16% |
Solved! Go to Solution.
Hi @lawada ,
You can also create a what-if parameter:
You could use something like:
Measure =
COUNTROWS (
FILTER (
SUMMARIZE ( 'laundries', laundries[laundryID], "_success rate", [success rate] ),
[_success rate] >= [Parameter Value]
)
)
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Best Regards,
Dedmon Dai
Hi @lawada ,
You can also create a what-if parameter:
You could use something like:
Measure =
COUNTROWS (
FILTER (
SUMMARIZE ( 'laundries', laundries[laundryID], "_success rate", [success rate] ),
[_success rate] >= [Parameter Value]
)
)
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Best Regards,
Dedmon Dai
@lawada - Not sure I follow 100% but from what I am seeing, I think you need a disconnected table for your slicer where you can set your threshold. Then you could use this to build a Complex Selector however you wish. So you slicer table might be:
Slicer Table = GENERATESERIES(0.1,0.9,0.1)
Then you could create a measure like this:
Selector Measure =
VAR __Threshold = SELECTEDVALUE('Slicer Table'[Value])
RETURN
IF([success rate[overall]]>__Threshold,1,0)
You could then use that in a visual level filter where you filter for 1 and not 0.
https://community.powerbi.com/t5/Quick-Measures-Gallery/The-Complex-Selector/m-p/1116633#M534
that works perfectly but now im trying to calculate number of laundries presented inside the table and visualize it inside a card , to do that i should use the "laundryID" from laundries table and create a measure this way: calculate(count(laundries[laundryID])).
however when i select a % from the slicer its counting all number of laundries without considering the selected %
@lawada , not very clear. But seems like you need a bucketing/segmentation. You need to create an independent table and create a measure to join with percent.
refer these
https://www.daxpatterns.com/dynamic-segmentation/
https://www.daxpatterns.com/static-segmentation/
https://radacad.com/dynamic-banding-or-grouping-in-power-bi-using-dax-measures-choose-the-size-of-bi...
https://www.credera.com/blog/technology-solutions/creating-aging-report-using-a-user-selected-date-i...
https://www.poweredsolutions.co/2020/01/11/dax-vs-power-query-static-segmentation-in-power-bi-dax-po...
https://radacad.com/grouping-and-binning-step-towards-better-data-visualization
User | Count |
---|---|
65 | |
61 | |
60 | |
54 | |
30 |
User | Count |
---|---|
180 | |
88 | |
72 | |
48 | |
46 |