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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
lab
Frequent Visitor

Subtracting a filter value

Hi !

I am trying to create a measure which subtracts filtered value based on month (Current month - previous month.)

Sum of the Actual Value for June where Type = "$" - Sum of the Actual Value for Previous Month (May) where Type = "Est"

i.e.  3,300 - 1,600=700

 

SegmentCountry Product  Discount Band Value Budget/Fcst/Actual  Type DateMonth Number Month Name Year
MidmarketFrance Carretera  None 2500 Actual  $ 6/1/20146 June 2014
MidmarketGermany Carretera  None 800 Actual  $ 6/1/20146 June 2014
MidmarketMexico Carretera  None 1500 Actual  Est. 5/1/20145 May 2014
MidmarketGermany Montana  None 100 Actual  Est. 5/1/20145 May 2014

 

Thank you.

1 ACCEPTED SOLUTION
dkaushik
Resolver II
Resolver II

Hi @lab 

 

You can try creating following measures:

CM Value= calculate(sum('TableName'[Value]), 'TableName'[Type] = "$")
PM Value = calculate(sum('TableName'[Value]), 'TableName'[Type] = "Est.", 'TableName'[Month Number] = 'TableName'[Month Number] - 1)
Diff Value = [CM Value] - PM Value]

 

Thanks,

Dheeraj

View solution in original post

2 REPLIES 2
dkaushik
Resolver II
Resolver II

Hi @lab 

 

You can try creating following measures:

CM Value= calculate(sum('TableName'[Value]), 'TableName'[Type] = "$")
PM Value = calculate(sum('TableName'[Value]), 'TableName'[Type] = "Est.", 'TableName'[Month Number] = 'TableName'[Month Number] - 1)
Diff Value = [CM Value] - PM Value]

 

Thanks,

Dheeraj

lab
Frequent Visitor

Thanks !

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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