Forum Discussion

Curtiosity's avatar
Curtiosity
Frequent Visitor
1 year ago
Solved

Dynamic measure method quit working

Someone else developed for me this method to show or not show columns (from the values section in a matrix) depending on if there was data or not for that column.

When I open the .pbix file they saved, it works fine. In trying to incorporate the same method in a different file where the semantic model has been updated, I couldn't get it to work. If I go back to the original file and remove the first field in the column section and put it right back, all the data disappears.

Possibly the .pbix file that works when I first open it was saved in a prior desktop version. However, it does the same thing in powerbi.com too.

I've hopefully included all relevant data in the attached image.

Any ideas of what is happening here, or some other method to achieve the same result of conditionally/dynamically displaying columns depending on if they have data in them or not?

  • Curtiosity 

    1. expand the drop down highlighted in red and change it to columns

    2. Click on the downward arrow highlighted in green

     

    This will solve the issue. Your measure was written in such a way that, it will only work if you expand both the columns in the column hierarchy or in other words only one value exist in the dynamic measures column, if it the columns hierachy is not expanded then that means you have multiple values in that column because of which the table is empty.

    hope it is clear to you

     

    Need a Power BI Consultation? Hire me on Upwork

     

     

     

    Connect on LinkedIn

     

     

     








    Did I answer your question? Mark my post as a solution!
    If I helped you, click on the Thumbs Up to give Kudos.

    Proud to be a Super User!


2 Replies

  • Curtiosity 

    1. expand the drop down highlighted in red and change it to columns

    2. Click on the downward arrow highlighted in green

     

    This will solve the issue. Your measure was written in such a way that, it will only work if you expand both the columns in the column hierarchy or in other words only one value exist in the dynamic measures column, if it the columns hierachy is not expanded then that means you have multiple values in that column because of which the table is empty.

    hope it is clear to you

     

    Need a Power BI Consultation? Hire me on Upwork

     

     

     

    Connect on LinkedIn

     

     

     








    Did I answer your question? Mark my post as a solution!
    If I helped you, click on the Thumbs Up to give Kudos.

    Proud to be a Super User!


  • Curtiosity's avatar
    Curtiosity
    Frequent Visitor

    Thank you so much!  That did the trick.  I had been wondering if the dynamic measure needed to include values from the L1_BUDGET_CATEGORY column too.