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
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])

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])

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

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.