Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Conditionnal formating, color saturation and so on require a measure, not a column, to be able to add a touch of color to my visualization.
So I need to turn text column into measures. What is the best way to do that?
I tried the following but don't really like it
columnToMeasure =
SWITCH (
MAX([Column]);"A";1;
MAX([Column]);"B";2;
MAX([Column]);"C";3;
0
)
Solved! Go to Solution.
The error message is because in a total Row is using all the rows in the filter context.
So to avoid this message you can use IF(HASONEVALUE('Unique Won....'[PROFILE OF CANDIDATE]), SWITCH.....
Let me know if works
Thank you for clarifying the right use of the switch function 😉
Unfortunately I still end up with the following error
It does work with MAX though, but I am not a big fan of this trick ;-(
Profile ID = SWITCH ( MAX('Unique Won SR Details'[PROFILE OF CANDIDATE]);"JR";1;"INT";2;"SR";3;0 )
The error message is because in a total Row is using all the rows in the filter context.
So to avoid this message you can use IF(HASONEVALUE('Unique Won....'[PROFILE OF CANDIDATE]), SWITCH.....
Let me know if works
Nice!
You are clearly da man!
The following works like a charm
Profile ID = IF(HASONEVALUE('Unique Won SR Details'[PROFILE OF CANDIDATE]);SWITCH (VALUES('Unique Won SR Details'[PROFILE OF CANDIDATE]);"JR";1;"INT";2;"SR";3;0);0)
I think that will successfully create a measure but not sure if that will work in the context of a visual. I think that will depend.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
109 | |
98 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
100 | |
86 | |
64 |