Forum Discussion
Transpose Table in DAX
Hello guys i have an issue,
i have a calculated table like this where the values are measures in a another table called "Records"
| A | B | C |
| 23 | 43 | 56 |
created using this DAX Expression
SELECTCOLUMNS(
ADDCOLUMNS('Records',
"A", [Measure A],
"B", [Measure B],
"C", [Measure C],
),
"A",[A],
"B", [B],
"C", [C]
)
I want to transpose it so it looks líke this.
| Measure | Value |
| A | 23 |
| B | 43 |
| C | 56 |
Or is there a way i can achieve this structure without having to use the DAX Expression above.
Please help.
Thank you
Hi Anonymous
UNION ( ROW ( "Measure", "A", "Value", [Measure A] ), ROW ( "Measure", "B", "Value", [Measure B] ), ROW ( "Measure", "C", "Value", [Measure C] ) )Please mark the question solved when done and consider giving a thumbs up if posts are helpful.
Contact me privately for support with any larger-scale BI needs, tutoring, etc.
Cheers
3 Replies
- AlBCommunity Champion
Hi Anonymous
UNION ( ROW ( "Measure", "A", "Value", [Measure A] ), ROW ( "Measure", "B", "Value", [Measure B] ), ROW ( "Measure", "C", "Value", [Measure C] ) )Please mark the question solved when done and consider giving a thumbs up if posts are helpful.
Contact me privately for support with any larger-scale BI needs, tutoring, etc.
Cheers
- AnonymousNot applicable
Oh My God, Thank you,
This worked like a dream.
I am so embarassed at how easy the solution was.
Again Thank you.
- ValerieRNew Member
Perfect! This option worked great for me! It's simple and to-the-point! I needed a table of Measure values and this option did the trick! The table I needed looked this:
<code>
CurrentProgramProgress =UNION (ROW ("Asset","REL","Current Progress",[RELActProjectProgress]),ROW ("Asset","Effort","Current Progress",[EffortActProjectProgress]),ROW ("Asset", "Station 515", "Current Progress", [Station515WeeklyProgress]),ROW ("Asset", "Station 201", "Current Progress", [Station201WeeklyProgress]),ROW ("Asset", "Station 505", "Current Progress", [Station505WeeklyProgress]),ROW ("Asset", "Comp Stn Mods", "Current Progress", [CompStnModsActOverallProgress]),ROW ("Asset", "Mt Laurel", "Current Progress", [MtLaurelActOverallProgress]),ROW ("Asset", "Lawnside", "Current Progress", [LawnsideActOtherProgress]),ROW ("Asset", "Camden", "Current Progress", [CamdenActOverallProgress]),ROW ("Asset", "Mainline A Regulator", "Current Progress", [MainlineAActOverallProgress]),ROW ("Asset", "Delaware River Regulator", "Current Progress", [DelawareActOverallProgress]),ROW ("Asset", "Beaver Dam", "Current Progress", [BeaverDamActOverallProgress]))</code>And the resulting table looked like this:It's perfect and just what I needed! Thank you!