Don't miss your chance to take exam DP-600 or DP-700 on us!
Request nowLearn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
Hi Folks,
Im having a hard time transposing the table. Just need the Dax for the Output Table basis the Source table. Your response will be a big help.
Thanks in advance.
Solved! Go to Solution.
Hi @yaudje ,
This is better done on Power Query using the Unpivot option however in dax you can use the following code:
Table 2 = UNION(
SELECTCOLUMNS('Table', "Sales", 'Table'[Sales],"Area", 'Table'[Area], "Year", 2019, "value", 'Table'[2019]),
SELECTCOLUMNS('Table',"Sales", 'Table'[Sales],"Area", 'Table'[Area], "Year", 2020, "value", 'Table'[2020]),
SELECTCOLUMNS('Table',"Sales", 'Table'[Sales],"Area", 'Table'[Area], "Year", 2021, "value", 'Table'[2021]))
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsHi @yaudje ,
This is better done on Power Query using the Unpivot option however in dax you can use the following code:
Table 2 = UNION(
SELECTCOLUMNS('Table', "Sales", 'Table'[Sales],"Area", 'Table'[Area], "Year", 2019, "value", 'Table'[2019]),
SELECTCOLUMNS('Table',"Sales", 'Table'[Sales],"Area", 'Table'[Area], "Year", 2020, "value", 'Table'[2020]),
SELECTCOLUMNS('Table',"Sales", 'Table'[Sales],"Area", 'Table'[Area], "Year", 2021, "value", 'Table'[2021]))
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsSUper thanks. This one works:-) Cheers mate/
Don't forget to accept the correct answer so it can help others
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsShare feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
Check out the February 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 49 | |
| 40 | |
| 32 | |
| 14 | |
| 13 |
| User | Count |
|---|---|
| 87 | |
| 72 | |
| 37 | |
| 28 | |
| 26 |