Forum Discussion
Giving values to filtered column
I would do this by adding a calculated column that categorizes TotalAmount into levels using the SWITCH function. See the example at http://www.powerpivotpro.com/2012/06/dax-making-the-case-for-switch/ for info on SWITCH. Your formula would be something like:
Level=SWITCH(TRUE(),
[TotalAmount]<7500, “Lvl1”,
AND([TotalAmount]>=7500, [TotalAmount]<20000), “Lvl2”,
AND([TotalAmount]>=20000, [TotalAmount]<=50000), “Lvl3”,
“Lvl4”
)
Then you would add a measure that counts that levels and that is what you would use on your chart. It would look something like:
LevelCount = CALCULATE(COUNTA([Level]))
- ALRUYOYO10 years agoAdvocate I
Thank you for your reply.
Unfortunatelly it is not possible to add calculated columns in direct query. At least I get this error message.