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,
Just a data queries before I start the modelling work in power bi.
I receive the Sales data in multi-columns format (horizontal) like this:
Jan | | Feb | | Mar | | Apr | | May | | Jun | | ...... Keeps on expanding |
and the columns keeps on increasing/decreasing based on previous/current/future years - which might be a problem for dax as it will require updating each time a column is add or dropped?
Is it a best practice (and keeping in mind that all the DAX i may write for calculations) to transpose the data into one column, like this:
Jan |
Feb |
Mar |
Apr |
May |
Jun |
..... Keeps on expanding |
Thoughts please..
Thanks
Solved! Go to Solution.
@mb0307 - In general, yes, 9 times out of 10 you want to unpivot those month columns. Difficult to be 100% sure without more detail but almost certainly yes.
Agree with @Greg_Deckler , unpivoting your data will make your calculation/DAX easier and better.
HI @mb0307
For the best outcome and also to use year into consideration and keeping the number of columns constant, it is best to unpivot and use it in the way you have described. You are on the right track.
Hope it resolves your issue? Did I answer your question? Mark my post as a solution! Appreciate your Kudos, Press the thumbs up button!! Linkedin Profile |
@mb0307 - In general, yes, 9 times out of 10 you want to unpivot those month columns. Difficult to be 100% sure without more detail but almost certainly yes.
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 | |
100 | |
81 | |
70 | |
62 |
User | Count |
---|---|
148 | |
116 | |
104 | |
90 | |
65 |