Unpivoting Columns in Calculated Power BI Table

Hello Fellow Power BI Users -

Good afternoon and hope you can help me.

Sam, I am trying to unpivot columns of CALCULATED POWER BI TABLE.
Do not see CALCULATED TABLE in Query mode.
Is there a way to do it using DAX ?

In the screen shot attached; I would like to unpivot all the columns with headers like ‘20181’, ‘20182’, ‘20174’, etc.

Thanking you in advance.

Best regards…Adi

I don’t believe there is a simple way to do this with DAX and wouldn’t really recommend it.

Why can’t you take the raw data and sort this all out in power query. That is where you should be aiming to complete data manipulation like this.

Personally I would aim to do things like this 100% in the query editor.

Hello Sam:
Thank you for your response.
I took your advice and did it all in Power Query.
Since my input file was very large (33 million rows x 120 columns) I thought of breaking it into steps.
Used you advice and did it all i query editor and it worked.
Best regards…Adi

Ok that’s great.

That’s a lot of rows and a really large table.

If it’s working in the query editor that’s great, but another alternative is to do it before it even gets to Power BI (ie. with SQL).

There’s a few options, but use the one that works best for you.

Thanks, Sam.
Yes, it worked in Power BI Query Editor…everyday more and more impressed by Power BI.
Best regards…Adi