Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
mb0307
Responsive Resident
Responsive Resident

Monthly data in multiple columns or single

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

 

1 ACCEPTED SOLUTION
Greg_Deckler
Community Champion
Community Champion

@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.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

3 REPLIES 3
mhossain
Solution Sage
Solution Sage

@mb0307 

 

Agree with @Greg_Deckler  , unpivoting your data will make your calculation/DAX easier and better.

Anonymous
Not applicable

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.

Greg_Deckler
Community Champion
Community Champion

@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.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.