Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago
Solved

Drill Down Dynamic Measure

Hello Everyone, im having a bit of a hassle finidng the solution for this

i have a bar chart, i can drill from client name to project name by the dril ldown method

i want to create a measure that will show the max measure of allselected based on thedrill down

so if i am on the main page, i need the maxx measure bt client name however if i drill down to one client name to see the projects, it switches to the maxx measure of the porject name

 

 

Measure = 
IF( HASONEVALUE(dimClient[ClientName]),
MAXX(ALLSELECTED(dimProjects[project.name]), [Total Tickets Created No Bugs]),
MAXX(ALLSELECTED(dimClient[ClientName]), [Total Tickets Created No Bugs])
)
*
1.5

 

 



this is when i have no drill down and default seeing by client name

 


green is the measure blue is just total tickets



as yo usee my measure returns 252 and the reference line shows 252 hwoever when i addd the bar to the chart, i get by the project name maxx

lets see the first client for example it shows 124.5 which is the maxx of my project inside this client name

in client name view, the green bars should all be 252 isntead of the maxx based on project name

how can i make it so it shows for all client names instead of project in the defualt

when i drill down it works fine

 



here is when i drill to first client to see projects as you see it works as intended they are the same value of 125



  • Anonymous's avatar
    Anonymous
    2 years ago

    Anonymous, ive notice if i just do maxx for client name and remove the project name from the axis, it returns correctly but as soon as i add the project name to the axis, the measure starts acting up and its like it doesnt know how to use aallselected. 

    my current workaround after countless tries is to just not do drill down but to use tooltips, i created a new page tooltip size for projetc name and now i just hover over my client name and i can see the project level.

    this is a niche workaround as if more projects get created, we cant scroll down in tooltips so im limited to seeing only multiple projects. 

    i hope powerbi team adds a new feature that will help tackle this issue with drill down

4 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Anonymous 

     

    The key to the problem may be to ensure that the measure correctly identifies the current level of detail and calculates the MAXX value accordingly.

     

    I tried the following changes to your code:

     

    DynamicMaxMeasure = 
    VAR IsClientLevel = ISINSCOPE(dimClient[ClientName])
    VAR IsProjectLevel = ISINSCOPE(dimProjects[project.name])
    RETURN
    IF(
        IsClientLevel,
        MAXX(ALLSELECTED(dimClient[ClientName]), [Total Tickets Created No Bugs]) * 1.5,
        IF(
            IsProjectLevel,
            MAXX(ALLSELECTED(dimProjects[project.name]), [Total Tickets Created No Bugs]) * 1.5,
            BLANK()
        )
    )

     

    This measure uses this function to determine the current level of detail.

     

    It checks whether the context is at the client level or the project level and calculates the maximum value accordingly. If neither context applies, a blank is returned.

     

    Regards,

    Nono Chen

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

    • Anonymous's avatar
      Anonymous
      Not applicable

      Anonymous, ive notice if i just do maxx for client name and remove the project name from the axis, it returns correctly but as soon as i add the project name to the axis, the measure starts acting up and its like it doesnt know how to use aallselected. 

      my current workaround after countless tries is to just not do drill down but to use tooltips, i created a new page tooltip size for projetc name and now i just hover over my client name and i can see the project level.

      this is a niche workaround as if more projects get created, we cant scroll down in tooltips so im limited to seeing only multiple projects. 

      i hope powerbi team adds a new feature that will help tackle this issue with drill down

      • Anonymous's avatar
        Anonymous
        Not applicable

        Hi Anonymous 

         

        Thank you very much for sharing. I think it is a good idea!

         

        Regards,

        Nono Chen

    • Anonymous's avatar
      Anonymous
      Not applicable

      hello Anonymous , thank you for taking the time to help me out.

      I've tried using this measure but still doesnt work and now the reference constnt line just shows blank.

      by client level:



      by project level