Forum Discussion

nffcspw's avatar
nffcspw
Regular Visitor
4 years ago
Solved

Keep measure result when navigating down a level

Hi all, 
I'm going around in circles to the point where I can't see the wood for the trees now.
I have a simple table:

and my objective is to identify any part that has more than one resource, then that part needs to have either a different cost or a different priority or both a different cost and priority.  [Green highlights].
If a part has more than one resource and the costs and the priorities are the same, then this needs to be flagged as an error.
The table result should show me:

The measure I have is:

T_Duplicates =
VAR Distinct_Cost = DISTINCTCOUNT(Resource[Cost])
VAR Distinct_Priority = DISTINCTCOUNT(Resource[Priority])
VAR Distinct_Resource = DISTINCTCOUNT(Resource[Resource])
return
if (Distinct_Resource = Distinct_Cost||Distinct_Resource=Distinct_Priority,"OK", "Same Cost or Priority")
 
which works fine at a part level:

 

but when I add the resource I get:

 

Now, I know the measure is recalculates at the row level but I can't think how to resolve.

Appreciate any help/guidance

Thanks

  • In your measure you need to explicitly remove the Resource filter.

1 Reply

  • In your measure you need to explicitly remove the Resource filter.