Forum Discussion
OskariNi
8 years agoHelper I
Transpose with DAX
Hi all, I have calculated new columns (week17-week20) with DAX formulas from another table ('Excel'). ( week20 = Table1[week19]+CALCULATE(COUNTA('Excel'[Week]);'Excel'[Week]=20;'Excel'[State]...
v-yulgu-msft
8 years agoMicrosoft Employee
Hi OskariNi,
These numbers represent the amount of Open workorders at the end of the week. I would like to draw curve with these values (axis=weeks, values=open workorders), but to do that I have to transpose the table into two columns. Is it possible to do that with DAX?
You can new an other calculated table using UNION() function.
NewTable =
UNION (
SELECTCOLUMNS ( Table1, "Week", "Before", "Value", Table1[Before] ),
SELECTCOLUMNS ( Table1, "Week", "week17", "Value", Table1[week17] ),
SELECTCOLUMNS ( Table1, "Week", "week18", "Value", Table1[week18] ),
SELECTCOLUMNS ( Table1, "Week", "week19", "Value", Table1[week19] ),
SELECTCOLUMNS ( Table1, "Week", "week20", "Value", Table1[week20] )
)
Best regards,
Yuliana Gu
makoknam
5 years agoFrequent Visitor
Thank you