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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
bpn1973
Resolver II
Resolver II

Compare entries in two tables

Hello!

 

I'm trying to comapre bases from two accounting systems (tables). Both tables should have same entries for each SKU code (the entries, that should match are marked with red). Unique SKU codes are in separate table. 

bpn1973_0-1605171578384.png

I created a simple measure that should've done the trick

Compare Groups = SELECTEDVALUE(UIS_ID_GOODS[Группа аналитического учета])=SELECTEDVALUE(NRS_ID_STRETCH[Группа аналитического учета])
The idea was for it return true or false.
And results returned by it are both wrong 😞 No Slicers or Filters applied.
I'm sure its a mistake on my part in the measure
Снимок экрана 2020-11-12 134151.png
 

Thank you!

 

 

1 ACCEPTED SOLUTION

Amitchandak, thank you for your reply. While making a sample pbix found a workaround for my problem.

Compare =
VAR NRS_VALUES =
SELECTEDVALUE ( NRS_ID[NRS SKU Group] )
VAR UIS_VALUES =
SELECTEDVALUE ( UIS_ID[UIS SKU Group] )
VAR RESULT =
IF ( NRS_VALUES <> UIS_VALUES, "FIX IT" )
RETURN
RESULT
 
Added two more measures with SELECTEDVALUE just to check if it displays the right thing.
bpn1973_0-1605183766000.png

 

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@bpn1973 , selectedvalues means they are coming from slicer ? one way is to move data from one table to another

https://www.youtube.com/watch?v=czNHt7UXIe8

Then we can do this in measure too. 

Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

Amitchandak, thank you for your reply. While making a sample pbix found a workaround for my problem.

Compare =
VAR NRS_VALUES =
SELECTEDVALUE ( NRS_ID[NRS SKU Group] )
VAR UIS_VALUES =
SELECTEDVALUE ( UIS_ID[UIS SKU Group] )
VAR RESULT =
IF ( NRS_VALUES <> UIS_VALUES, "FIX IT" )
RETURN
RESULT
 
Added two more measures with SELECTEDVALUE just to check if it displays the right thing.
bpn1973_0-1605183766000.png

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.