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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
mkudis
Frequent Visitor

Comparing two tables and getting the data differences

In my Sales Report, I have a page that has two tables with the same data, however you can select different dates for each table, so that you can do a custom date comparison.  Is there a way that I can show the differences (Sales, Profit, Sales Change, Profit Change) on the page as well, so that it will update as the user selects different custom dates for one table or the other (or both)?  

 

 

3 REPLIES 3
lbendlin
Super User
Super User

yes, you can write measures that fetch the filter context for each visual and can then do the required computations

 

Any advice or help on how to do so?  Or articles/training that I can look at to help work my way through it on my own?  I don't mind self learning, don't need the solution written out for me, but I have no idea where to start here.

 

All of my sales data resides in table SalesAnalysis.  It is simply Total Sales and a Measure (Margin) that provides me the profit.  I have two date slicers, one for each table, so the user can select a custom date range on both.  Just want to compare what I have in table A to table B.

Please provide sanitized sample data that fully covers your issue. If you paste the data into a table in your post or use one of the file services it will be easier to assist you. I cannot use screenshots of your source data.

Please show the expected outcome based on the sample data you provided. Screenshots of the expected outcome are ok.

https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.