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
EvgenyZhutov
Frequent Visitor

DCount items by conditional cumulative value

Hi All, 

 

I have 5 DAX-formulas for calculating paretto (ABC analysis)

 

1) Total Sales = sum('Table1'[Sales])
2) Total Sales for all products = SUMX(all('Table1'[Product]);[Total Sales])
3) Rank = if(HASONEVALUE('Table1'[Product]);RANKX(ALL('Table1'[Product]);[Total Sales]);BLANK())
4) Cumulativa total = if(HASONEVALUE('Table1'[Product]);SUMX(TOPN([Rank];all('Table1'[Product]);[Total Sales];DESC);[Total Sales]);BLANK())
5)  Cumulative percentage = DIVIDE([Cumulativa total];[Total Sales for all products];0)*100
 
It's solution working fine and correctly calculation.
 
How i can calculate DCount products for A (<0,8), B (>0,8<0,95, C (>0,95) in 3 measure.
 
E.g. A = 50 products; B=40 products; C= 13 products
 
1 REPLY 1
lc_finance
Solution Sage
Solution Sage

Hi @EvgenyZhutov ,

 

 

can you try the following measures:

 

DCount A = SUMX(
   VALUES('Table1'[Product]), 
   IF([Cumulative percentage]<0.8,1,0) 
)

DCount B = SUMX(
   VALUES('Table1'[Product]), 
   IF(
     AND([Cumulative percentage]>=0.8,[Cumulative percentage]<0.95 )
   ,1,0) 
)

DCount A = SUMX(
   VALUES('Table1'[Product]), 
   IF([Cumulative percentage]>0.95,1,0) 
)

 

Let me know if they work for you.

 

LC

Interested in Power BI and DAX templates? Check out my blog at www.finance-bi.com

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