Forum Discussion
Categorical Calculated Measure on X Axis
- 1 year ago
Hi Arash_Bhz ,
You can try using -
Inventory By Bin =
SWITCH(
SELECTEDVALUE('InvCoverageBins'[Bin]),
"0-5 Days", CALCULATE([Inventory], FILTER(ALL('Materials'), [InvCoverageMeasure] >= 0 && [InvCoverageMeasure] < 5)),
"5-10 Days", CALCULATE([Inventory], FILTER(ALL('Materials'), [InvCoverageMeasure] >= 5 && [InvCoverageMeasure] < 10)),
"10-20 Days", CALCULATE([Inventory], FILTER(ALL('Materials'), [InvCoverageMeasure] >= 10 && [InvCoverageMeasure] < 20)),
"20-30 Days", CALCULATE([Inventory], FILTER(ALL('Materials'), [InvCoverageMeasure] >= 20 && [InvCoverageMeasure] < 30)),
"30+ Days", CALCULATE([Inventory], FILTER(ALL('Materials'), [InvCoverageMeasure] >= 30))
)
Material Count By Bin =
SWITCH(
SELECTEDVALUE('InvCoverageBins'[Bin]),
"0-5 Days", CALCULATE(DISTINCTCOUNT(Materials[Material ID]), FILTER(ALL('Materials'), [InvCoverageMeasure] >= 0 && [InvCoverageMeasure] < 5)),
"5-10 Days", CALCULATE(DISTINCTCOUNT(Materials[Material ID]), FILTER(ALL('Materials'), [InvCoverageMeasure] >= 5 && [InvCoverageMeasure] < 10)),
"10-20 Days", CALCULATE(DISTINCTCOUNT(Materials[Material ID]), FILTER(ALL('Materials'), [InvCoverageMeasure] >= 10 && [InvCoverageMeasure] < 20)),
"20-30 Days", CALCULATE(DISTINCTCOUNT(Materials[Material ID]), FILTER(ALL('Materials'), [InvCoverageMeasure] >= 20 && [InvCoverageMeasure] < 30)),
"30+ Days", CALCULATE(DISTINCTCOUNT(Materials[Material ID]), FILTER(ALL('Materials'), [InvCoverageMeasure] >= 30))
)
If the response has addressed your query, please Accept it as a solution and give a 'Kudos' so other members can easily find it.
Thank You!
Hi @Arash_Bhz ,
Just wanted to check if you had the opportunity to review the suggestions provided?
If the response has addressed your query, please Accept it as a solution and give a 'Kudos' so other members can easily find it.
Thank You