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

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
deng2431
Helper I
Helper I

Dax- compare values if matches the same key with filtering columns value

Hi All,

 

I couldnt figure out this filtering concept... I am trying validate if any [Invoice Key] is the same when [Full Exclusion]

 is marked as opposite to each other (Yes/No). if in column [Full Exclusion] is 'Yes' then compare if any [Invoice Key] exist with the 'No' then in the [Double Exclusion] column mark that row as 'Yes' 

 

 

deng2431_0-1668741629003.png

 

i tried this column measure but doesnt get the desired result:

 

Double Exclusion =
var _Ex3 = CALCULATE(maxa('Fact PTRS Full Detail list'[Invoice Key]),'Fact PTRS Full Detail list'[Full Exclusion] = "Yes")
var _Ex4 = CALCULATE(MAXA('Fact PTRS Full Detail list'[Invoice Key]),'Fact PTRS Full Detail list'[Full Exclusion] = "No")
Return

IF(_Ex3 = _Ex4, "Yes","No")

 

 

The issue i am trying to solve is there is 2 table on the PowerBI report, 1 is for the [Full Exclusion] = Yes and other is [Full Exclusion] = No

but I need to make a note of which invoice number exists in both tables. 

 

Any help is really appreciated!! Cheers  

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@deng2431 , a new column

New columm=
var _cnt = countx(filter('Fact PTRS Full Detail list',[Invoice Key] = earlier([Invoice Key]) && [Full Exclusion] = "No"), [Invoice Key])
return
if(isblank(_cnt), "No", [Full Exclusion])

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

2 REPLIES 2
deng2431
Helper I
Helper I

oh awesome @amitchandak - love your work!!

the formula worked really well. 

amitchandak
Super User
Super User

@deng2431 , a new column

New columm=
var _cnt = countx(filter('Fact PTRS Full Detail list',[Invoice Key] = earlier([Invoice Key]) && [Full Exclusion] = "No"), [Invoice Key])
return
if(isblank(_cnt), "No", [Full Exclusion])

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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.