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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
Moniek
Resolver I
Resolver I

Compare 2 tables

Hi

 

I have 2 tables from 2 different sources, and the turnover I would like to compare per person. In itself no problem. I created the formulas with DAX. Only now I want to add a slicer to the results table, so that you can filter only on the differences. You can possibly do this through the filter panel, but can this also be done very simply through a slicer? I know you can make an extra table, but can it be easier?

 

Thanks!

 

Moniek_0-1684137139833.png

 

3 REPLIES 3
v-zhangti
Community Support
Community Support

Hi, @Moniek 

 

You can try the following methods.

New table:

 

Table = DISTINCT(UNION(VALUES(Table1[Person]),VALUES(Table2[Person])))

 

vzhangti_0-1684287335746.png

Measure:

 

Source1 = CALCULATE(SUM(Table1[Turnover]),FILTER(ALL(Table1),[Person]=SELECTEDVALUE('Table'[Person])))+0
Source2 = CALCULATE(SUM(Table2[Turnover]),FILTER(ALL(Table2),[Person]=SELECTEDVALUE('Table'[Person])))+0
Difference = [Source1]-[Source2]

 

vzhangti_1-1684287392005.png

Is this the result you expect?

 

Best Regards,

Community Support Team _Charlotte

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

@v-zhangti thanks for your answer, to make the table is clear, but to add a slicer of the difference measure on a simply way, is that possible?

 

lbendlin
Super User
Super User

Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
https://community.powerbi.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-...
Please show the expected outcome based on the sample data you provided.

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

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

AugPowerBI_Carousel

Power BI Monthly Update - August 2024

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

August Carousel

Fabric Community Update - August 2024

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