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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
ZachPLPI
Frequent Visitor

Sales Stratification/Grouping

I have searched all over for this answer but I cannot find it. It seems this would be a pretty popular command, though and my lack of knowledge in this area is probably due to my experience with power BI.

 

I am trying to group my clients by sales over a period of time. For example, I want

 

Client                           Premium           

Fred's Donuts               $1000

Fred's Donuts               $5000

Sam's Auto                    $100

Eric's Dentistry              $10500

 

to show in a table as:

Client Group                Total

Clients < $500             $100 

Clients $500 - $2000   $6000

Clients > $10,000        $10,500

 

How can I do that? And will that total move dynamicly by page level date filters? For example, if Eric's Dentistry only has $600 in premium last year and I filter to last year at the visual level, will he move to the Clients $500 - $2000 group automatically?         

2 REPLIES 2
v-juanli-msft
Community Support
Community Support

Hi @ZachPLPI 

Create measures

Measure = CALCULATE(SUM('Table'[premium]),FILTER(ALLSELECTED('Table'),'Table'[client]=MAX('Table'[client])))

Measure 2 =
SWITCH (
    TRUE (),
    [Measure] < 500, "<500",
    [Measure] >= 500
        && [Measure] < 2000, "500~2000",
    [Measure] >= 2000
        && [Measure] < 10000, "2000~10000",
    [Measure] > 10000, ">10000",
    "other"
)
Capture3.JPGCapture4.JPG
 
Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

I plugged this in a while back and it was still pulling premiums that were more or less than there assigned measure. Might there be a typo?

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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