Forum Discussion

jyaul786's avatar
jyaul786
Helper II
2 years ago

Hide/remove matrix rows

Dear Friend,

i have one table with Level1,Level2,Level3,Level4 and value, i want to display in Matrix with hierarchy.

Data:

Level1Level2Level3Level4value
Assetcurrentbankbank110
Assetcurrentgsgs111
Assetfixedlandland112
IncomeDirect  13
IncomeIndirect  14
ExpenseDirectexpense1 15
ExpenseIndirectexpense2 16

Matrix:

i dont have Level 3 and Level 4 for certain row, how can remove of that rows as mark below. i want to hide or remove the mark rows. Could you please help

 

 

16 Replies

  • try this

    Flag = IF(MAX(Level 3) = BLANK()||MAX(Level 4)=BLANK(),0,1)

    throw the measure on visual level ,  You can apply visual level filters in that you can select 1

    • jyaul786's avatar
      jyaul786
      Helper II

      Hello,

      i tried but complete Level 1 Income,Expense also filter.

       

       

    • jyaul786's avatar
      jyaul786
      Helper II

      i have some restrictions here so that i can't share pbix. this is simple pbix file with sample data:

      Level1Level2Level3Level4value
      Assetcurrentbankbank110
      Assetcurrentgsgs111
      Assetfixedlandland112
      IncomeDirect  13
      IncomeIndirect  14
      ExpenseDirectexpense1 15
      ExpenseIndirectexpense2 16

       

      u can develop and test. thanks for your time and cooperation.

  • DOLEARY85's avatar
    DOLEARY85
    Resident Rockstar

    Hi,

     

    try this measure to replace your value field in the matrix:

     

    Value Measure= SWITCH(TRUE(),and(ISINSCOPE('Table'[Level3]),ISBLANK(VALUES('Table'[Level3]))),BLANK(),and(ISINSCOPE('Table'[Level4]),ISBLANK(VALUES('Table'[Level4]))),BLANK(),SUM('Table'[value]))
     
    If I answered your question, please mark my post as solution, Appreciate your Kudos 👍
    • jyaul786's avatar
      jyaul786
      Helper II

      i tried your measure but i have still empty rows as:

      measure=

      SWITCH(
         TRUE(),
         and(ISINSCOPE('Table test'[Level3]),ISBLANK(VALUES('Table test'[Level3]))),BLANK(),
         and(ISINSCOPE('Table test'[Level4]),ISBLANK(VALUES('Table test'[Level4]))),BLANK(),SUM('Table test'[value])
         )

       

       

      • DOLEARY85's avatar
        DOLEARY85
        Resident Rockstar

        Strange it works with the test data you provided, without being able to view your file i'm not sure what other solution could work.

         

        I've attached my PBIX file for you to review, hopefully it will provide some additional help:

         

        If I answered your question, please mark my post as solution, Appreciate your Kudos 👍