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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
Anonymous
Not applicable

Comparing two Tables working but extremely slow

Hi.  

 

I have my compare function working when comparing two different tables but it way to slow to release to any end user.

 

I am comparing Data_POG metrics vs Data_Performance metrics in two different tables.  Both tables are tied to a Product List and a Store List.

 

 

Simming2022_0-1682874219915.png

 

I need to know if they if they match..if they are the same, or less, or more.  The file is about 60K so it is not the file size.  I believe it is how I am using dax formulas.

 

 

Here is an example of how I am getting to the "Less" caclulation in the Post Files.  I do the same calculation for the Pre and compare them. 

Should I combine the tables and then redo the dax formulas?  Append and then group by?  Thanks for any help on how to layout this database or redo calculations to improve speed.

--------------

 

Post $ Sales - Less:=VAR PreFilter = [Pre_Filter]

VAR PostFilter = [Post_Filter]

RETURN

SUMX (

SUMMARIZE ( Data_POG, KGR_PROD_MSTR[Base UPC],KGR_STR_MSTR[DivStr] ),

VAR PreCheck =

CALCULATE (

CALCULATE (

[Ttl Capacity],

FILTER ( VALUES ( Data_POG[Relay] ), Data_POG[Relay] = PreFilter )

)

)

VAR PostCheck =

CALCULATE (

CALCULATE (

[Ttl Capacity],

FILTER ( VALUES ( Data_POG[Relay] ), Data_POG[Relay] = PostFilter )

)

)

VAR PostVel =

CALCULATE (

CALCULATE (

[$ Vel],

FILTER ( VALUES ( Data_Perf[Relay] ), Data_Perf[Relay] = PostFilter )

)

)

RETURN

IF (

PostCheck > 0

&& PostCheck < PreCheck

&& PreCheck <> BLANK (),

PostVel,

BLANK ()

)

)

1 ACCEPTED SOLUTION
lbendlin
Super User
Super User

What are your criteria for "match"?

 

Usually you compare via INTERSECT and/or EXCEPT.

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Thank you!

lbendlin
Super User
Super User

What are your criteria for "match"?

 

Usually you compare via INTERSECT and/or EXCEPT.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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