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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
mhgottsc
Helper I
Helper I

Calculating the difference between two visuals with filters applied.

So I need to find the diffrence in contracts billed this month vs last month but the visuals have filters applied that I need to keep.

How would I do this in dax? 

 

mhgottsc_0-1654282557563.png

mhgottsc_1-1654282571727.png

 

1 ACCEPTED SOLUTION
v-kkf-msft
Community Support
Community Support

Hi @mhgottsc ,

 

Please try the measure.

 

Measure = 
CALCULATE (
    SUM ( 'Table'[Amount] ),
    FILTER (
        'Table',
        FORMAT ( 'Table'[Last Billed Date], "yyyymm" ) = FORMAT ( TODAY (), "yyyymm" )
    )
)
    - CALCULATE ( SUM ( 'Table'[Amount] ), 'Table'[Billed Last Month] = "Yes" )

vkkfmsft_0-1654680962801.png

 

If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
v-kkf-msft
Community Support
Community Support

Hi @mhgottsc ,

 

Please try the measure.

 

Measure = 
CALCULATE (
    SUM ( 'Table'[Amount] ),
    FILTER (
        'Table',
        FORMAT ( 'Table'[Last Billed Date], "yyyymm" ) = FORMAT ( TODAY (), "yyyymm" )
    )
)
    - CALCULATE ( SUM ( 'Table'[Amount] ), 'Table'[Billed Last Month] = "Yes" )

vkkfmsft_0-1654680962801.png

 

If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

I ended up just makeing the mesures withing the visual itself and claculating the difference between the visual levele mesures. 

amitchandak
Super User
Super User

@mhgottsc , You need two date slicer or two dimension slicer

 

How to use two Date/Period slicers

https://youtu.be/WSeZr_-MiTg

 

Compare two Brands: https://youtu.be/exN4nTewgbc

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 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