Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
I have this table with unique jobs,group and different colours. What i need a calculated column which will check for all unique group and jobs and condition on colours with group. If any of the record fulfills the colour condtion the rest records should be updated with the same result.
Group | Colours | Jobs | Condition | Expected Result |
1 | RED | Job1 | Unique group and unique Jobs search for "Red" color in all the records, if found set the result to RED | RED |
1 | BLUE | Job1 | RED | |
1 | BLUE | Job1 | RED | |
2 | Gray | Job2 | Unique group and unique Jobs search for "Gray" color in all the records, if found set the result to RED | Gray |
2 | Back | Job2 | Gray |
How to achieve this using calculated column or measure. Appreciate quick response
Solved! Go to Solution.
@powerbisach,
Please create the following columns in your table.
Column = CALCULATE(CONCATENATEX(VALUES(Table1[Colours]),Table1[Colours],","),ALLEXCEPT(Table1,Table1[Group]))
check = IF(IFERROR(SEARCH("RED",Table1[Column]),-1)>0,"RED",IF(IFERROR(SEARCH("Gray",Table1[Column]),-1)>0 ,"Gray"))
Regards,
Lydia
Thanks for your reply. Your solution approach looks perfect.
I have huge data, so for search i need to write multiple conditions. Is there a way i can pass conditions dynamically to search, rather than giving each condition seperately.
No. You would need to write all possible conditions in the DAX.
Regards,
Lydia
@powerbisach,
Please create the following columns in your table.
Column = CALCULATE(CONCATENATEX(VALUES(Table1[Colours]),Table1[Colours],","),ALLEXCEPT(Table1,Table1[Group]))
check = IF(IFERROR(SEARCH("RED",Table1[Column]),-1)>0,"RED",IF(IFERROR(SEARCH("Gray",Table1[Column]),-1)>0 ,"Gray"))
Regards,
Lydia
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
95 | |
69 | |
44 | |
38 | |
30 |
User | Count |
---|---|
159 | |
98 | |
60 | |
42 | |
42 |