Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
nffcspw
Regular Visitor

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:

nffcspw_2-1646324923392.png

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:
nffcspw_1-1646324894308.png

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:
nffcspw_5-1646325733695.png

 

but when I add the resource I get:

nffcspw_6-1646325920679.png

 

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

Appreciate any help/guidance

Thanks

1 ACCEPTED SOLUTION
lbendlin
Super User
Super User

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

View solution in original post

1 REPLY 1
lbendlin
Super User
Super User

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

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.