Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi All,
I'm new here and beginner in PBI. I have data originally with 5 columns and to be manipulated for visuals (line & bar chart). I have to introduce new column to re-shape & calculate the different between subsequent event of data as compared to 1st data available for every unit ID. The new column is to be introduced for visual plot (column F untill K). I attached here the perfect data arrangement (in excel format) that i need to do in PBI.
Question here what is DAX formula that i can i apply to have value at firstdate for "PCP subsidence", "SCP Subsidence" and "CCP Subsidence" to be in new column of "PCP_1", "SCP_1" and "CCP_1" for every unique ID. The reason of sorting like this is to simplify the calculation of subseqeunt event for unique ID with first value on the firstdate.
Thank you in advance for any feedback & help.
Solved! Go to Solution.
Unpivoting as a principle should not be impacted by how many columns you have. I don't think you need to use VBA in preference to Power Querr
I have produced a small sample workbook for you.
https://www.dropbox.com/s/cwcgduqi7efdath/reshape.pbix?dl=1
I unpivoted the data into a different shape that makes the code more efficient. Take a look and see if you can work out how it works. Let me know if you have questions.
Matt
Hi Matt,
Thanks for help, really appreciate it. Actually original file are with many columns with other parameters more than what i provided before, see as attached. That is the reason why i need to find a way to re-shape the data at the 1st place. Perhaps i need to reshape the data using VBA in excel prior import to PBI if DAX is not possible to do it?
Redzuan
Unpivoting as a principle should not be impacted by how many columns you have. I don't think you need to use VBA in preference to Power Querr
Hi Matt,
I managed to automate by using unpivot in data query. This is what i need. Thanks for the solution. Awesome!
Thanks
Redzuan
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
114 | |
99 | |
82 | |
70 | |
60 |
User | Count |
---|---|
149 | |
114 | |
107 | |
89 | |
67 |