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
dobregon
Impactful Individual
Impactful Individual

Matrix Visual Metadata Levels need to ignore blanks

Hi,

 

I have a problem in matrix visual and i hope maybe someone can help me on this.

 

In this example I have 2 markets called (Zara and Zara Home) and they have different locations. I have created 10 leves of location and a market can have 1, 2, etc levels depends or the details (picure below and only the 01/01/2019 but the example has value from Dec 2018 to Jan 2019)detail.JPG

 

 

So, you can see that the 2 markets doesn't have all the levels because they don't need. So, I need to have the sum of VALOR and do the matrix visual (picture below) and then i will have the values by all the metadata and dates.matrixvisual1.JPG

 The problem here is that we can see all the levels (including blanks) and I only want to see the levels with names. For that, i have tried (but these don't solve all the problems). 

 

  • First i have created 2 measures in order to know the number of the level and the maximum levels that the market has.
    Asset_Max_lentgh = value(max(Table1[PATHLENGH]))
    
    Asset_path = ISFILTERED(Table1[LEVEL 1])+ISFILTERED(Table1[LEVEL 2])+ISFILTERED(Table1[LEVEL 3])+ISFILTERED(Table1[LEVEL 4])+ISFILTERED(Table1[LEVEL 5])+ISFILTERED(Table1[LEVEL 6])+ISFILTERED(Table1[LEVEL 7])+ISFILTERED(Table1[LEVEL 8])+ISFILTERED(Table1[LEVEL 9])+ISFILTERED(Table1[LEVEL 10])+ISFILTERED(Table1[TIENDA])
    And the result of this:
    matrixvisual2.JPGKnowing the position of the levels I can 2 different measures 
    matrixvisual3.JPG

 

  1. VALUE TYPE 1
    VALUE TYPE 1 = IF(Table1[Asset_path]>Table1[Asset_Max_lentgh],BLANK(),sum(Table1[VALOR]))
    In this case, i'm calculating the value only in the leves that the asset path is less or equal to the max lenthg. Result:



    valuetype1.JPG

    So, as you see the system automaticaly ignore the leves that doesn't have value. I lost the name, but it can solve it puting in the next level of the last level that the market has a text.  
    But the big problem is that here i can see the date hierarchy becasue the visual remove the next levels.

  2.  VALUE TYPE 2
    VALUE TYPE 2 = IF(AND(Table1[Asset_path]>Table1[Asset_Max_lentgh],Table1[Asset_path]<11),BLANK(),SUM(Table1[VALOR]))

    Here I'm doing a mixure. I need to have the value in the levels that they have name and apart of that need the values in the other metatada apart of levels (tienda, dates, etc) and the result is

    valuetype2.JPG

    But the visual doesn't remove the levels in blank as the Visual for Value Type 1. It seems that the visual remove the blank rows only if there aren't exist any row with values in the bottom.

     

Can someone help me on this? 

*Apart of that i can't upload a file pbi, i don't know why

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 



Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)
10 REPLIES 10

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.