Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
lawada
Helper III
Helper III

help: counting number of values below and above the selected range

i have a table that shows the following values:

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 have created  a percentage selector slicer where i can select the percentage range and  slice the table by the success rate[overall] (the  % selector was created using a seperate table with the "generateseries" function.


Now, i have to create 2 measures,  the 1st will count number of laundries below the selected range and the 2nd measure will count number of laundries above the selected range.

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 nametotal ordersplaced orderssuccussful orderssuccess rate[overall] %success rate %
laundry 120318516280%87.57%
laundry 220118016180%89.44%
laundry 318516414076%85.37%
laundry 417216115087%93.17%
laundry 520518314872%80.87%
laundry 621119317482%90.16%

 

2 REPLIES 2
Greg_Deckler
Super User
Super User

@lawada This looks like a measure aggregation problem. See my blog article about that here: https://community.powerbi.com/t5/Community-Blog/Design-Pattern-Groups-and-Super-Groups/ba-p/138149

The pattern is:
MinScoreMeasure = MINX ( SUMMARIZE ( Table, Table[Group] , "Measure",[YourMeasure] ), [Measure])
MaxScoreMeasure = MAXX ( SUMMARIZE ( Table, Table[Group] , "Measure",[YourMeasure] ), [Measure])
AvgScoreMeasure = AVERAGEX ( SUMMARIZE ( Table, Table[Group] , "Measure",[YourMeasure] ), [Measure])
etc.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors