Forum Discussion
Calculated measures
- Anonymous5 years ago
Hi MiraAnniina
In addition to amitchandak ‘s reply, if you want to show result "xxx" or "yyy" based on the month column, you just need to build one measure/ calculated column to achieve your goal.
Try if or switch function.
Measure:
Measure = SWITCH(MAX('Table'[Month]),"January","xxx","February","yyy","zzz")Calculated column:
Calculated column = SWITCH('Table'[Month],"January","xxx","February","yyy","zzz")Result is as below.
Build a matrix visual and don't forget set show values in row in Format.
If you want to show result as you show above, you may need to build measures for each month.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, sorry for my poor question. I will try to be more clear. Does this example help:
| January | February | |
| Measure 1 (on Jan) | xxx | |
| Measure 2 (on Feb) | yyy |
Now I'm looking for a function, that would show these "xxx" and "yyy" on the report based on the month column. So I would have a measure on rows and depending on the month, it will or will not show the amount. What would my functions look like on rows Measure 1 and Measure 2?
Hi MiraAnniina
In addition to amitchandak ‘s reply, if you want to show result "xxx" or "yyy" based on the month column, you just need to build one measure/ calculated column to achieve your goal.
Try if or switch function.
Measure:
Measure =
SWITCH(MAX('Table'[Month]),"January","xxx","February","yyy","zzz")
Calculated column:
Calculated column =
SWITCH('Table'[Month],"January","xxx","February","yyy","zzz")
Result is as below.
Build a matrix visual and don't forget set show values in row in Format.
If you want to show result as you show above, you may need to build measures for each month.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.