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.
As you may see from the above figures, the question is I would like to transform the table to be the following:
Total Bed 465
OC 89
FR 236
NOP 140
Thanks.
Solved! Go to Solution.
Hi @harryli ,
You can accomplish this with a disconnected (no relationships to other tables) table that holds the values of the measures you want to display. The order column allows you to set a custom order.
Then use a switch statement to display the correct value.
displaycolumn =
var selection = SELECTEDVALUE('Measures (2)'[Measure])
RETURN
SWITCH(
TRUE(),
Selection = "Total Bed", [Total Bed],
Selection = "OC", [OC],
Selection = "FR", [FR],
Selection = "NOP", [NOP])
Then create a table with the Measure column from the disconnected table and the displaycolumn measure.
I hope this solves your question - if it does please mark it as a solution!
Hi @harryli ,
No, to follow the solution that Signore_Ands provided you just need to change your table to a matrix in the visualisation pane. Then the "Options" will be available to you.
Hi @harryli
Have you tried the solutions provided by other two users? They should work well. For the second solution with Switch values to rows option, it is available in Matrix visual rather than Table visual.
Best Regards,
Community Support Team _ Jing
Hi @harryli - is it not a case of changing the setting "switch values to rows"?
That may do the trick.
Thanks for your message, but I cannot find the "Options" in the dashboard.
Hi @harryli ,
That option is only available when using the matrix visual, not the table visual as you currently are using.
Hi @johncolley ,
That means I need to build the matrix table* to store each of the values I want to display. Or are there any methods to transform the table visual?
*matrix table like the following figure
Thanks a lot.
Hi @harryli ,
No, to follow the solution that Signore_Ands provided you just need to change your table to a matrix in the visualisation pane. Then the "Options" will be available to you.
Thanks, and it works.
Hi @harryli ,
You can accomplish this with a disconnected (no relationships to other tables) table that holds the values of the measures you want to display. The order column allows you to set a custom order.
Then use a switch statement to display the correct value.
displaycolumn =
var selection = SELECTEDVALUE('Measures (2)'[Measure])
RETURN
SWITCH(
TRUE(),
Selection = "Total Bed", [Total Bed],
Selection = "OC", [OC],
Selection = "FR", [FR],
Selection = "NOP", [NOP])
Then create a table with the Measure column from the disconnected table and the displaycolumn measure.
I hope this solves your question - if it does please mark it as a solution!
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 |
---|---|
110 | |
94 | |
80 | |
67 | |
58 |
User | Count |
---|---|
150 | |
119 | |
104 | |
87 | |
67 |