Forum Discussion
Anonymous
4 years agoNot applicable
Create new column or measure
I am having trouble figuring out the best way to do this task. I have 18 duplicate pm_id for a task and if any of those 18 fail in the value column then the whole thing fails. Would it be best ...
- 4 years ago
Anonymous,
How you intend to use this field will help you determine which approach to use. If you need to slice on this field in a visual (or use it in a slicer), a calculated column will enable you to do so. Here's the DAX for a calculated column:
result = IF ( CALCULATE ( COUNT ( Table1[pm_template_task_id] ), ALLEXCEPT ( Table1, Table1[pm_id] ), Table1[value] = "Fail" ) > 0, "Fail", "Pass" )
DataInsights
Super User
4 years agoAnonymous,
Would you provide an example of the desired result?
Anonymous
4 years agoNot applicable
Here is what i came up with for the measure:
Pass/Fail Count =
Pass/Fail Count =
CALCULATE(
DISTINCTCOUNT(Query1[pm_id]),
SUMMARIZE(
Query1,
Query1[result]
)
)