Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hi,
I'm trying to put in a measure to work out if a record has been checked.
I have the attached data, with an orderid, and then a duplicates key (some customers can have more than one order delivered by the same driver)
I have a list of order_ids that have been checked externally, and put in a list. If the order_id is in the list, it comes up as IsDuplicate = true.
What I am trying to do is put in the "Has been checked" column (in red). If one of the records with the same key has "isduplicate" = true then all the records with that key should be marked as true.
I am using the following measure:
DuplicatesCheck = CONTAINS(FILTER(Data,Data[DuplicatesKey]=SELECTEDVALUE(Data[DuplicatesKey])),Data[IsDuplicate],TRUE()) |
but I get the same value as the isDuplicate Column.
I referred to this thread, which got me some of the way there:
https://community.powerbi.com/t5/DAX-Commands-and-Tips/Boolean-Aggregate-Functions/td-p/1364240
I'm sure I'm close, but I just can't get there.
order_id | DuplicatesKey | IsDuplicate | Has Been Checked |
956687684s | 4/1/2021___TRUE | FALSE | FALSE |
974646346s | 4/1/2021___TRUE | FALSE | FALSE |
913576467s | 4/1/2021___TRUE | FALSE | FALSE |
187704359n | 4/1/2021_Driver1_Cust-A_TRUE | FALSE | TRUE |
195733809n | 4/1/2021_Driver1_Cust-A_TRUE | TRUE | TRUE |
115093281q | 4/1/2021_Driver2_Cust-B_TRUE | TRUE | TRUE |
161218806q | 4/1/2021_Driver2_Cust-B_TRUE | FALSE | TRUE |
157854642v | 4/1/2021_Driver3_Cust-C_TRUE | TRUE | TRUE |
161272024v | 4/1/2021_Driver3_Cust-C_TRUE | TRUE | TRUE |
170455160v | 4/1/2021_Driver3_Cust-C_TRUE | FALSE | TRUE |
106823034n | 4/1/2021_Driver4_Cust-D_TRUE | FALSE | FALSE |
143195051n | 4/1/2021_Driver4_Cust-D_TRUE | FALSE | FALSE |
101293113n | 4/1/2021_Driver5_Cust-E_TRUE | FALSE | TRUE |
167289758n | 4/1/2021_Driver5_Cust-E_TRUE | TRUE | TRUE |
Thanks!
Dave
Solved! Go to Solution.
Try this @Anonymous
Has Been Checked =
CALCULATE (
CONTAINS ( Data, Data[IsDuplicate], TRUE () ),
ALLEXCEPT ( Data, Data[DuplicatesKey] )
)
I just removed all filters from the table except for the DuplicatesKey. The [Has Been Checked orig] is your text values in the desired goal above.
My measure is the far right column in red.
DAX is for Analysis. Power Query is for Data Modeling
Proud to be a Super User!
MCSA: BI ReportingTry this @Anonymous
Has Been Checked =
CALCULATE (
CONTAINS ( Data, Data[IsDuplicate], TRUE () ),
ALLEXCEPT ( Data, Data[DuplicatesKey] )
)
I just removed all filters from the table except for the DuplicatesKey. The [Has Been Checked orig] is your text values in the desired goal above.
My measure is the far right column in red.
DAX is for Analysis. Power Query is for Data Modeling
Proud to be a Super User!
MCSA: BI ReportingThanks @edhans - I had tried something similar and it didn't work - this works perfectly!
Excellent. Glad I was able to assist @Anonymous
DAX is for Analysis. Power Query is for Data Modeling
Proud to be a Super User!
MCSA: BI ReportingCheck out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
23 | |
11 | |
10 | |
9 | |
8 |