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

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
Julia_Mav
Helper II
Helper II

Help with sorting and classification

Hi all 🙂

Could you help me move this logic from Excel to Power BI? I need to filter products into type I or II using the following process:
  • Sort revenue from highest to lowest.
  • Calculate the total sum of revenue.
  • Calculate 80% of the total revenue.
  • And if a product's revenue is part of the top 80%, it's classified as Type I; otherwise, it's Type II.

Thanks!

Illustration below also helps in understanding the request. Sorry instead 3800, should be 4080image-3.png

 

1 ACCEPTED SOLUTION
ryan_mayu
Super User
Super User

@Julia_Mav 

pls see the attachment below

11.PNG





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @Julia_Mav ,

 

1. you can click transform data to go into power query editor, select sorting method and apply it.

vkaiyuemsft_0-1726119600613.png

 

2. you can create measures to calculate the total revenue and 80% of the total revenue respectively.

 

Total Revenue = SUM('Table'[Revenue])

 

Revenue Target = [Total Revenue] * 0.8

 

vkaiyuemsft_1-1726119640048.png


3. You can create calculation columns for categorization.

Column = 
VAR _sum =
    SUM ( 'Table'[Revenue] )
VAR _80 = _sum * 0.8
VAR _rev =
    CALCULATE (
        SUM ( 'Table'[Revenue] ),
        FILTER ( 'Table', 'Table'[Revenue] >= EARLIER ( 'Table'[Revenue] ) )
    )
RETURN
    IF ( _rev <= _80, "I", "II" )

vkaiyuemsft_2-1726119679396.png

 

If your Current Period does not refer to this, please clarify in a follow-up reply.

 

Best Regards,

Clara Gong

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.

ryan_mayu
Super User
Super User

@Julia_Mav 

pls see the attachment below

11.PNG





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.