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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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

 Segment Country Product Discount Band Value Budget/Fcst/Actual Type Date Month Number Month Name Year Midmarket France Carretera None 2500 Actual \$ 6/1/2014 6 June 2014 Midmarket Germany Carretera None 800 Actual \$ 6/1/2014 6 June 2014 Midmarket Mexico Carretera None 1500 Actual Est. 5/1/2014 5 May 2014 Midmarket Germany Montana None 100 Actual Est. 5/1/2014 5 May 2014

Thank you.

1 ACCEPTED SOLUTION
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

2 REPLIES 2
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

Frequent Visitor

Thanks !

## Helpful resources

Announcements

#### Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

#### Power BI Monthly Update - April 2024

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

#### Fabric Community Update - April 2024

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

Top Solution Authors
Top Kudoed Authors