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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
DataKev1
Regular Visitor

Calculate difference of 2 values from same table - different date ranges

Hi all - still a pretty new user to PBI and DAX but enjoying the learning.

 

I am trying to calculate the difference of 2 date ranges within the same table containing summed numerical data.

 

I have one date table and one fact table containing daily numerical data. I have been able to assign summed daily values to 2 separate date ranges through the use of 2 card visuals and 2 date slicers by editing their interactions. However I cannot find a way to calculate the difference between the 2. I have tried using 2 separate measures and a third "difference" measure but that is not viable.

 

I have also tried using 2 date tables and using the USERELATIONSHIP function to relate the 2nd date table to my second date range, still not working.

 

If anyone has any ideas that would be a great help.

1 ACCEPTED SOLUTION
Anonymous
Not applicable

@DataKev1  - I think you're looking for something similar to this: https://community.powerbi.com/t5/Desktop/Percent-Change-Measure-based-on-Filter/m-p/750463#M361755

 

I hope this helps. If it does, please Mark as a solution.
I also appreciate Kudos.
Nathan Peterson

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

@DataKev1  - I think you're looking for something similar to this: https://community.powerbi.com/t5/Desktop/Percent-Change-Measure-based-on-Filter/m-p/750463#M361755

 

I hope this helps. If it does, please Mark as a solution.
I also appreciate Kudos.
Nathan Peterson

Thanks for the reply @Anonymous I'll give it a try.

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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