Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi All
I am facing a challenge to create a measure as a flag to compare two column values.
here i want to check if one capability_id has different milestone_id and setting as a flag like if milestone_id is blank then 1 or else 0.
Please help me on this.
thanks
Solved! Go to Solution.
Hi @Anonymous ,
You may create measure like DAX below.
Flag =
var _CountDiff= CALCULATE(COUNT(Table1[milestone_id]), ALLEXCEPT(Table1, Table1[capability_id]))
Return
SUMX(Table1, IF(_CountDiff>=2 , 1, 0))
Best Regards,
Amy
Community Support Team _ Amy
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
i want to campare with capability_id , if one capability_id has two values in milestone_id then need to set flag.
| milestone_id | capability_id | flag |
| Null | C123 | 0 |
| M1 | C123 | 1 |
| Null | C324 | 2 |
Hi @Anonymous
Hope, you would like to try the conditional column option in Power Query Editor to create a new column as shown below.
Power Query Editor --> Add Column --> Conditional Column
Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Regards,
Pranit
@Anonymous its a live connection to cube as dot able to see those settings
Hi @Anonymous ,
You may create measure like DAX below.
Flag =
var _CountDiff= CALCULATE(COUNT(Table1[milestone_id]), ALLEXCEPT(Table1, Table1[capability_id]))
Return
SUMX(Table1, IF(_CountDiff>=2 , 1, 0))
Best Regards,
Amy
Community Support Team _ Amy
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!