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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
Anonymous
Not applicable

How to calculate Total Variance for January month

Hello, 

 

I am struck at how can we calculate the total variance for January month for a particular project. 

I came to know that the total variance for January month = (Current month Variance) - (Baseline Dec month Variance)

I have Variance columns in the table. How can I create calculation part to get the total variance for a particular project?

Help needed, thanks in advance.

 

Bhavesh

2 ACCEPTED SOLUTIONS
Anonymous
Not applicable

If you do not have a date table, you need to create a date table (Date dimension) and connect your snapshot date to the date in newly created date table. 

 

Then create 3measures

1- YTD Current Month := TOTALYTD(SUM('Project Costs'[Variance]), Date[date])
2- YTD Prior Month := CALCULATE( [YTD Current Month], PREVIOUSMONTH(Date[Date]))
3- MTD (January) := [YTD Current Month] - [YTD Prior Month]

View solution in original post

Anonymous
Not applicable

Yes, I got it, Thank you @Anonymous for your help 🙂

View solution in original post

7 REPLIES 7
Phil_Seamark
Microsoft Employee
Microsoft Employee

Hi @Anonymous

 

If you post a sample set of your table, we can suggest calculations that will fit your model


To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

Anonymous
Not applicable

This is my sample table looks like. 

Table name: Project Costs 

Columns: Project_Number, Variance, POC, Region, Country, Currency_rate, Variance USD

 

Table.PNG     

 

For the above table 'Project Costs' I am trying to find Total variance and POC so that I will get YTD and MTD values

YTD= Total Variance*POC

MTD= (Total variance current month) - (Total variance previous month)

 

I have POC values column so I need Total Variance in order to find out YTD and MTD.

 

total variance for January month = (Current month Variance) - (Baseline Dec month Variance)

 

Please help me, thanks @Phil_Seamark

 

 

 

Anonymous
Not applicable

Hi @Phil_Seamark

 

Thanks for your response. I tried to calculate Total Variance and YTD values by using the below measures

Total Variance = (SUM('Project Costs'[Variance])-CALCULATE(SUM('Project Costs'[Variance]), PREVIOUSMONTH('Project Costs'[Snapshot Date].[Date])))*-1

 

YTD (January) = YTD Savings Cost reduction(+) / Cost increase(-) = ([Total Variance] * AVERAGE('Project Costs'[POC]))/100

 

But I am unable to find out MTD values for the table. 

MTD (January) = YTD (January) - YTD (December), this is the calculation.

 

But how can measure MTD values in Power BI report? Please help me, thanks 

 

Bhavesh

Anonymous
Not applicable

If you do not have a date table, you need to create a date table (Date dimension) and connect your snapshot date to the date in newly created date table. 

 

Then create 3measures

1- YTD Current Month := TOTALYTD(SUM('Project Costs'[Variance]), Date[date])
2- YTD Prior Month := CALCULATE( [YTD Current Month], PREVIOUSMONTH(Date[Date]))
3- MTD (January) := [YTD Current Month] - [YTD Prior Month]

Anonymous
Not applicable

Yes, I got it, Thank you @Anonymous for your help 🙂

HI @Anonymous

 

Do you have a Date (or Calendar) table in your model connected to this table?  

 

 


To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

Anonymous
Not applicable

Yes @Phil_Seamark I have Snapshot Date in my table. 

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors
Top Kudoed Authors