The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hello Evryone,
I am newbie in PowerBI, I have table which looks like this :
SKU | FIRST | SECOND | THIRD |
SKU1 | 10 | 20 | 30 |
SKU2 | 5 | 15 | 25 |
Now I want to create a CALCULATETABLE from the above existing table which will look like below:
SKU | INTERVALS | VALUES |
SKU1 | FIRST | 10 |
SKU1 | SECOND | 20 |
SKU1 | THIRD | 30 |
SKU2 | FIRST | 5 |
SKU2 | SECOND | 15 |
SKU2 | THIRD | 25 |
In the Power Query Editor it uses M, not DAX.
When data is loaded it will go through whatever steps you apply to transform the data. For example if you had the data you provided and chose to use my solution from the screenshot, you won't have to do it again as it will be part of your 'Applied Steps'.
Hi Sky,
Thanks , got it how it works but it is modifying the existing table, I want a new table along with the existing one.
You can duplicate the table before you make any changes then apply the changes to the new table.
ok was doing that but creating a duplicate table will work in a dynamic way ?
Hi Sky,
Thanks for your reply, I have many columns in the my table , just for simplicity I have given four columns and also I want this to happend dynamically, once I load the data this table should be created. Is this can be done using DAX?
You can do this in the Power Query Editor quite easily.
Under the 'Transform' tab with your SKU column selected,
Find 'Unpivot Columns' > 'Unpivot Other Columns'
And you should get your result!