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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
namratabansode3
New Member

How to show percentage range count by subcategory

I have calculated the count under the percentage range Using these two measures:- 

  1. Pareto % Range =

SWITCH (

    TRUE,

    [Pareto % top n rev Time] <= 0.20, "A",

   [Pareto % top n rev Time]>0.20 && [Pareto % top n rev Time]<=0.40,"B",

   [Pareto % top n rev Time]>0.40 && [Pareto % top n rev Time]<=0.80,"C",

   [Pareto % top n rev Time]>0.80 && [Pareto % top n rev Time]<=1,"D"

)
2. 

Filter Class pareto SKU = Var TopSKURAnge = SELECTEDVALUE('Top SKU'[Top SKU Range])

Var CurrentSelection = SELECTEDVALUE(Class[Column1])

Var BudStatus = [Pareto % Range]

Return

SWITCH(

    TRUE(),

    TopSKURAnge = "0-20%" && CurrentSelection = "A" && BudStatus = "A",1,

    TopSKURAnge = "20-40%" &&CurrentSelection = "B" && BudStatus = "B",1,

    TopSKURAnge = "40-80%" &&CurrentSelection = "C" && BudStatus = "C",1,

    TopSKURAnge = "80-100%" &&CurrentSelection = "D" && BudStatus = "D",1,

    0)

I got this result using these two measures :

But I wanted to show same count by each category and sub_category in this percentage range but there is no relationship between my category class table and dim_product table so it looking like this 

 Want final result like this 

Sub_category 

A

B

C

Beef 

1

4

28

Chicken

3

6

55

Frozen Pastry 

 

1

9

Frozen processed vegetable

 

 

1

Mutton

 

 

3

Planed Based 

 

1

1

Seafood 

 

1

3

Turkey

 

1

5

Total

4

13

92

Help me out if you know

4 REPLIES 4
v-jianboli-msft
Community Support
Community Support

Hi @namratabansode3 ,

 

The result you provided seems disapper. What does your sourece data look like?

Sorry for that the information you have provided is not making the problem clear to me. Can you please share more details to help us clarify your scenario?

Please provide me with more details about your table and your problem or share me with your pbix file after removing sensitive data.

 

Refer to:

How to provide sample data in the Power BI Forum

How to Get Your Question Answered Quickly

 

Best Regards,

Jianbo Li

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

namratabansode3
New Member

still, I am unable to show the count by category 

namratabansode3
New Member

I wanted to show ABC classification by subcategory  mentioned in last table

amitchandak
Super User
Super User

@namratabansode3 , Do you need like ABC analysis ? if yes refer

https://www.daxpatterns.com/abc-classification/

 

https://exceleratorbi.com.au/pareto-analysis-in-power-bi/

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

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! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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