Forum Discussion
Matrix table with Target and YtD in the beginning
- 1 year ago
Hi Harrisfil ,
Create a new field parameter table where you add all the measures, then add a measure with the following code:
Measure = SWITCH(TRUE(), SELECTEDVALUE(Parameter[Parameter Order]) = 0 && SELECTEDVALUE(Categories[Categories]) = "Chat", [_AGENT_CES%], SELECTEDVALUE(Parameter[Parameter Order]) = 1 && SELECTEDVALUE(Categories[Categories]) = "Chat", [_AGENT_CSAT%], SELECTEDVALUE(Parameter[Parameter Order]) = 2 && SELECTEDVALUE(Categories[Categories]) = "Email", [_Mail_CES%], SELECTEDVALUE(Parameter[Parameter Order]) = 3 && SELECTEDVALUE(Categories[Categories]) = "Email", [_Mail_CSAT%], SELECTEDVALUE(Parameter[Parameter Order]) = 4 && SELECTEDVALUE(Categories[Categories]) = "Phone", [_PhoneCES%], SELECTEDVALUE(Parameter[Parameter Order]) = 5 && SELECTEDVALUE(Categories[Categories]) = "Phone", [_PhoneCSAT%] )The order numbers must match the ones in the Field parameter table:
Add a condittional formatting to your measure so everything match your formats:
SWITCH(TRUE(), SELECTEDVALUE(Parameter[Parameter Order]) = 0 && SELECTEDVALUE(Categories[Categories]) = "Chat", "0.00%", SELECTEDVALUE(Parameter[Parameter Order]) = 1 && SELECTEDVALUE(Categories[Categories]) = "Chat", "0.00%", SELECTEDVALUE(Parameter[Parameter Order]) = 2 && SELECTEDVALUE(Categories[Categories]) = "Email", "0.00%", SELECTEDVALUE(Parameter[Parameter Order]) = 3 && SELECTEDVALUE(Categories[Categories]) = "Email", "0.00%", SELECTEDVALUE(Parameter[Parameter Order]) = 4 && SELECTEDVALUE(Categories[Categories]) = "Phone", "0.00%", SELECTEDVALUE(Parameter[Parameter Order]) = 5 && SELECTEDVALUE(Categories[Categories]) = "Phone", "0.00%" )Now on the table visual add the parameter field on the rows and the new measure on values, also don't forget to check the option of the Show selected field:
in case i want to add also MoM % or WoW % is that feasible with conditional formatting ?
an idea i had is to add custom columns for each month but im still thinking a solution for that.
Hi Harrisfil ,
Check this video with an explanation with calculation groups.
https://www.youtube.com/watch?v=YU5nddHQ-oo&list=PLiYSIjh4cEx0Pa3uNq3P-lF2wfl2avkj9
When you get to more complex scenarios you need to implement automated and reusable codes.