Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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.
@Anonymous ,
Not very clear , Try a new column like
if(isblank([Milestone_id]),1,0)
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 |
@Anonymous , Logic is not clear
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
Hope it resolves your issue? Did I answer your question? Mark my post as a solution! Appreciate your Kudos, Press the thumbs up button!! Linkedin Profile |
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.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
113 | |
97 | |
85 | |
70 | |
61 |
User | Count |
---|---|
151 | |
121 | |
104 | |
87 | |
67 |