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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

Frequent Visitor

Need help to create YTD column & TOTAL column

I need help to create YTD column & TOTAL column in the right side of this table0



There are two slicers: Report_Year & Report_Month. For Report_Month (value from 1 to 12), it has months (from Jan to Dec) in it. For example, in Report Month 2, there are monthly values from January - December (to be make sense, there are actual cost data in January - February & forecasted data for March until December).

How to add YTD column & Total column on the right side of table? For example, if 2 is selected in report month, YTD = sum of Jan & Feb, Total = sum from Jan to Dec. If 4 is selected, YTD = Sum of Jan+Feb+Mar+Apr, Total = sum from Jan to Dec.

Here are my pbix sample file: vehicle data.pbix 


Really appreciate your help

Super User
Super User

You will need to unpivot your month data to make it usable. Does Report_Year/Report_Month  mean you have multiple snapshots? How are these related to the months of data?




Helpful resources

Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

Check out the February 2024 Power BI update to learn about new features.

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.

Top Solution Authors