Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Learn 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 |
|---|---|
| 52 | |
| 48 | |
| 38 | |
| 15 | |
| 14 |
| User | Count |
|---|---|
| 91 | |
| 76 | |
| 37 | |
| 27 | |
| 25 |