Forum Discussion
Switch MTD & YTD visualizing multiple variables
Hi,
I have data for monthly 'Spend amount','Savings amount' and Savings %. The last one is savings amount divided by spend amount. I calculated MTD & YTD figures for all 3 variables. Then I build a slicer table for the switch MTD & YTD. What I want is to present MTD figures for each month and all 3 variables in a table when the user selects MTD. When YTD is selected this should switch to YTD figures. Second I want a graph showing the MTD or YTD savings amount for all months (dependend on the switch MTD / YTD) and the savings % MTD or YTD. This is what I already have. Till now data is only available for January 2019.
I tried to work with an extra table and Switch key, but that did not work unfortunately. But I am convinced the solution should be found there somehow.
Thanks for your help in advance.
- Anonymous7 years ago
Maybe there is another solution, but I already solved it myself building 3 separate measure selections and putting them in the table or graph.
Measure_Selection_Savings =SWITCH( TRUE(),VALUES(Slicer_table_savings[Time Cut]) = "MTD", [MTD_savings],VALUES(Slicer_table_savings[Time Cut]) = "YTD", [YTD_savings],BLANK())Measure_Selection_Spend =SWITCH( TRUE(),VALUES(Slicer_table_savings[Time Cut]) = "MTD", [MTD_Spend],VALUES(Slicer_table_savings[Time Cut]) = "YTD", [YTD_Spend],BLANK())Measure_Selection_Savings % =SWITCH( TRUE(),VALUES(Slicer_table_savings[Time Cut]) = "MTD", [MTD_Savings %],VALUES(Slicer_table_savings[Time Cut]) = "YTD", [YTD_savings %],BLANK()) Hi Anonymous ,
It seems that you have solved by yourself.
Please always accept the replies making sense as solution to your question so that people who may have the same question can get the solution directly.
Best Regards,
Cherry
2 Replies
- AnonymousNot applicable
Maybe there is another solution, but I already solved it myself building 3 separate measure selections and putting them in the table or graph.
Measure_Selection_Savings =SWITCH( TRUE(),VALUES(Slicer_table_savings[Time Cut]) = "MTD", [MTD_savings],VALUES(Slicer_table_savings[Time Cut]) = "YTD", [YTD_savings],BLANK())Measure_Selection_Spend =SWITCH( TRUE(),VALUES(Slicer_table_savings[Time Cut]) = "MTD", [MTD_Spend],VALUES(Slicer_table_savings[Time Cut]) = "YTD", [YTD_Spend],BLANK())Measure_Selection_Savings % =SWITCH( TRUE(),VALUES(Slicer_table_savings[Time Cut]) = "MTD", [MTD_Savings %],VALUES(Slicer_table_savings[Time Cut]) = "YTD", [YTD_savings %],BLANK())- v-piga-msftResident Rockstar
Hi Anonymous ,
It seems that you have solved by yourself.
Please always accept the replies making sense as solution to your question so that people who may have the same question can get the solution directly.
Best Regards,
Cherry