Forum Discussion
chudson
Helper IV
7 years agoDAX expression looking up multiple values with a unique search value
For simplicity sake, I have a factsales table and another order table that contains a unique order number per row. My Dummy tables are below and basically what I want to do is lookup in my factsales...
- 7 years ago
Hi chudson ,
you could try creating a calculated summary table with DAX using a formula like
Summarized Table = ADDCOLUMNS(
You could also accomplish this using power query grouping.
SUMMARIZE('Details', Details[Ordernum],
"Products", CONCATENATEX('Details', 'Details'[Product], ",")),
"Return", if(FIND("AA",[Products], 1, 0) >0 && FIND("DD",[Products], 1, 0) >0 , "Yes", "No"))Richard
Zubair_Muhammad
Community Champion
7 years agoHi chudson
As a calculated column, you can use
Column =
ISEMPTY (
EXCEPT ( { "AA", "DD" }, CALCULATETABLE ( VALUES ( FactSales[Product] ) ) )
)
chudson
Helper IV
7 years ago
I tried that version in my model but am getting True values only. Do I need to have some sort of reference to the order number as well?
Thanks,
- richbenmintz7 years ago
Resident Rockstar
Hi chudson ,
you could try creating a calculated summary table with DAX using a formula like
Summarized Table = ADDCOLUMNS(
You could also accomplish this using power query grouping.
SUMMARIZE('Details', Details[Ordernum],
"Products", CONCATENATEX('Details', 'Details'[Product], ",")),
"Return", if(FIND("AA",[Products], 1, 0) >0 && FIND("DD",[Products], 1, 0) >0 , "Yes", "No"))Richard