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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
gpapasara
Frequent Visitor

Compare same and different dates from one data source

Hello people, I am new to the Bi and the community. 

 

I have a question that I could not find the exact same in other posts. I want to compare from one data source different and same dates, for example I want to compare 2 retailers on the same dates, or one retailer in two periods of time. Any ideas?

 

Capture.PNG

3 REPLIES 3
v-piga-msft
Resident Rockstar
Resident Rockstar

Hi @gpapasara,

 

I have made test with creating two measures as your requirement.

 

Difference for the same retailer =
IF (
    ISFILTERED ( 'Table'[Retailer] ),
    CALCULATE (
        SUM ( 'Table'[Sales] ),
        FILTER ( 'Table', 'Table'[Date] = MAX ( 'Table'[Date] ) )
    )
        - CALCULATE ( SUM ( 'Table'[Sales] ), DATEADD ( 'Table'[Date], -1, DAY ) ),
    BLANK ()
)
difference for the same date =
IF (
    ISFILTERED ( 'Table'[Date] ),
    CALCULATE (
        SUM ( 'Table'[Sales] ),
        FILTER ( 'Table', 'Table'[Retailer] = "B" )
    )
        - CALCULATE (
            SUM ( 'Table'[Sales] ),
            FILTER ( 'Table', 'Table'[Retailer] = "A" )
        ),
    BLANK ()
)

Here is the output.

 

difference.png

 

More details you could refer to the attachment.

 

If you need additional help, please share some data sample and your desired output.

 

Best Regards,

Cherry

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi, thank you for replying,

 

Please find below a sample of my data:

Capture2.PNG

 

 

 

What I would like to have at the end of this is something like that:

Capture.PNG

 

Thank you again for the help.

 

 

Hi @gpapasara,

 

You could have a reference of this similar thread which has been solved.

 

If you still need help, could you please share your data sample as table, because it will take a lot time to create a data sample like the image you uploaded

 

Best Regards,

Cherry

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors