Forum Discussion
Percentile Bins, Group by Year
- Anonymous10 years ago
How about something like:
Bin= SWITCH(TRUE,
Table1[Ratio] <= PERCENTILE.INC(Table1[Ratio], 0.25), 1,
Table1[Ratio] <= PERCENTILE.INC(Table1[Ratio], 0.50), 2,
Table1[Ratio] <= PERCENTILE.INC(Table1[Ratio], 0.75), 3,
4)?
Please try the following
1. Create a new table called Band with coulmn names - Position, MinimumValue, MaximumValue
2. The rows of this table will be
1, 0, 0.30
2, 0.31,0.50
3,0.51,0.70
4, 0.71, 0.90
5, 0.91, 1.00
3. In the fact table define a column Bin
=CALCULATE (
VALUES ( Band[Position] ),
FILTER (
Band,
FactTable[RatioNetAssetsUnrestricted] >= Band[MinimumValue]
&&FactTable[RatioNetAssetsUnrestricted] <= Band[MaximumValue]
)
)
This will work.
If you have any issues let me know.
If you find the above steps solved your problem, please accept as solution and also give Kudos.