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

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.

Reply
PocketProtector
Frequent Visitor

Change Legend Value Based On Drill Level

I am tracking projects' phases through time on a bar char, from design to construction.  I am counting how many projects are in each phase at a given point in time as a kind of resource utilization chart.

 

If the user is looking at a Day drill level, that's easy.  But when the user drills up to Month, a project could be in both phases in a month if, let's say, it changes from design to construction on the 15th.  At that level I would like the project to be counted only once as being "in between" rather than design or constuction... until the user drills back down to day.

 

The In Between legend value could never exist at the day level but would appear as soon as the user drilled up to a month or quarter.  Any suggestions appreciated!

 

 

2 REPLIES 2
Anonymous
Not applicable


@PocketProtector wrote:

I am tracking projects' phases through time on a bar char, from design to construction.  I am counting how many projects are in each phase at a given point in time as a kind of resource utilization chart.

 

If the user is looking at a Day drill level, that's easy.  But when the user drills up to Month, a project could be in both phases in a month if, let's say, it changes from design to construction on the 15th.  At that level I would like the project to be counted only once as being "in between" rather than design or constuction... until the user drills back down to day.

 

The In Between legend value could never exist at the day level but would appear as soon as the user drilled up to a month or quarter.  Any suggestions appreciated!


Well, you should approach this in a different way. You should have a dimension called something like "Project Phases" and in there you should store all the possible phases (together with your "in-between"). Then, you should create a measure that would for any given time frame return the number of projects that are in any of the phases stored in there. Then your problem disappears...

 

Proper model design is more important than mastery of DAX: https://www.youtube.com/watch?v=pvIVMEFQokE

 

Best

Darek

 

 

Stachu
Community Champion
Community Champion

Hi, can you add sample tables from your model with anonymised data?

 

As described here:

How to Get Your Question Answered Quickly 

here is some general info on hierarchies that might be helpful

https://www.sqlbi.com/articles/clever-hierarchy-handling-in-dax/



Did I answer your question? Mark my post as a solution!
Thank you for the kudos 🙂

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors