Forum Discussion
Power BI Measure - Summarize distinct values
- Anonymous4 years ago
Hi Thumper369 ,
Here's the solution.
1.The dummy data I created.
2.Create a measure to calculate the Defective Effort.
Defective Effort = CALCULATE ( SUM ( 'Work items with direct links'[Effort] ), FILTER ( ALLSELECTED ( 'Work items with direct links' ), [ID] = MAX ( 'Work items with direct links'[ID] ) && [Links.TargetWorkItem.WorkItemId] <> BLANK () ) )3.You can see that the total in the table is incorrect, so we just need to create a new measure to add them correctly.
4.The new measure.
Total = VAR _table = ADDCOLUMNS ( VALUES ( 'Work items with direct links'[ID] ), "DE", [Defective Effort] ) RETURN SUMX ( _table, [DE] )If you're still confused, please provide some dummy data and expected results.
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi Thumper369 ,
Here's the solution.
1.The dummy data I created.
2.Create a measure to calculate the Defective Effort.
Defective Effort =
CALCULATE (
SUM ( 'Work items with direct links'[Effort] ),
FILTER (
ALLSELECTED ( 'Work items with direct links' ),
[ID] = MAX ( 'Work items with direct links'[ID] )
&& [Links.TargetWorkItem.WorkItemId] <> BLANK ()
)
)
3.You can see that the total in the table is incorrect, so we just need to create a new measure to add them correctly.
4.The new measure.
Total =
VAR _table =
ADDCOLUMNS (
VALUES ( 'Work items with direct links'[ID] ),
"DE", [Defective Effort]
)
RETURN
SUMX ( _table, [DE] )
If you're still confused, please provide some dummy data and expected results.
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.