Forum Discussion
nicoenz
Helper III
2 years agoPercentile 33 based on a summarized table
Hi everyone, I have a table with production data by product, region and many other columns Table 1 Product Customer Region other columns in table Production ...
- 2 years ago
Hi nicoenz
Use PERCENTILEX.INC like this:
Production Percentile 33 by Product = PERCENTILEX.INC ( VALUES ( Production[Product] ), CALCULATE ( SUM ( Production[Production] ) ), 0.33 )Also, if you create a measure for Production Sum (which I would recommend) e.g.
Production Sum = SUM ( Production[Production] )then you can write:
Production Percentile 33 by Product = PERCENTILEX.INC ( VALUES ( Production[Product] ), [Production Sum], 0.33 )Does this work for you?
Regards
- 2 years ago
Hi again nicoenz
Apologies, I was caught up yesterday.
You could reformulate slightly and create a measure like this:
Production below 33rd Percentile = VAR Percentile33 = CALCULATE ( PERCENTILEX.INC ( VALUES ( Production[Product] ), [Production Sum], 0.33 ), ALLSELECTED () ) VAR ProductionBelowPercentile33 = SUMX ( VALUES ( Production[Product] ), VAR Prod = [Production Sum] RETURN IF ( Prod < Percentile33, Prod ) ) RETURN ProductionBelowPercentile33Does this work for you?
Regards
OwenAuger
Super User
2 years agoHi again nicoenz
Apologies, I was caught up yesterday.
You could reformulate slightly and create a measure like this:
Production below 33rd Percentile =
VAR Percentile33 =
CALCULATE (
PERCENTILEX.INC ( VALUES ( Production[Product] ), [Production Sum], 0.33 ),
ALLSELECTED ()
)
VAR ProductionBelowPercentile33 =
SUMX (
VALUES ( Production[Product] ),
VAR Prod = [Production Sum]
RETURN
IF ( Prod < Percentile33, Prod )
)
RETURN
ProductionBelowPercentile33
Does this work for you?
Regards