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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
AjayRangarajan
Frequent Visitor

Need to sum the Values from one date to another date. the dates are stacked in column.

Hi All , 

It would be grateful if any one can help me with a DAX formula(Measure) for summing the column from one date to another for each line item as the dates are all stacked as headers. i have added the screen shot , so what i need is to sum the ETC hours for the column from 2nd May to 13 june 20. Thanks in advance for your help.

 

AjayRangarajan_0-1597564630355.png

 

1 ACCEPTED SOLUTION
AllisonKennedy
Super User
Super User

Power BI is designed to work in columns, not rows.

So I recommend you click Transform Data from the Home tab and Unpivot the dates. To make this work for future data updates (as the date column headings change), I recommend you select all the NON date columns (in your screenshot this would mean you must select [Level], [ETC Hours], and any of the columns to the left that aren't in your screenshot).
Once you have selected these columns, click the Transform tab from within the Power Query Editor, then select Unpivot Other Columns. You will be left with ETC Hours, Level, Attribute and Value. Rename these if you wish.
Close & Apply your changes.
Then you can put the [Value] column (or whatever you renamed it to) in a visual in the Values and filter by date, level, etc.

Please @mention me in your reply if you want a response.

Copying DAX from this post? Click here for a hack to quickly replace it with your own table names

Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C

I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com

View solution in original post

1 REPLY 1
AllisonKennedy
Super User
Super User

Power BI is designed to work in columns, not rows.

So I recommend you click Transform Data from the Home tab and Unpivot the dates. To make this work for future data updates (as the date column headings change), I recommend you select all the NON date columns (in your screenshot this would mean you must select [Level], [ETC Hours], and any of the columns to the left that aren't in your screenshot).
Once you have selected these columns, click the Transform tab from within the Power Query Editor, then select Unpivot Other Columns. You will be left with ETC Hours, Level, Attribute and Value. Rename these if you wish.
Close & Apply your changes.
Then you can put the [Value] column (or whatever you renamed it to) in a visual in the Values and filter by date, level, etc.

Please @mention me in your reply if you want a response.

Copying DAX from this post? Click here for a hack to quickly replace it with your own table names

Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C

I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.