Forum Discussion
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)
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.
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:
Knowing the position of the levels I can 2 different measures
- 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: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. - 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 isBut 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
10 Replies
- tex628
Community Champion
How large is your original dataset?
- tex628
Community Champion
Ì dont think it's possible to do what your aiming for, but im not entirely certain.
This might be close to a solution but i'm not sure it's possible with the size of your dataset.
If you in the query loop through your columns to identify which are empty and which hold a value you can place "ZARA" in the highest empty column in the table. In this case that would mean that you place the value "ZARA" in the Level 6 column, since it's lacking a value.
This might not work with how u want it, but its the closest that i can think of