Forum Discussion

diablo908's avatar
diablo908
Frequent Visitor
1 year ago
Solved

Remove/Hide Blank/Empty Columns in Matrix

Is it possible to remove or hide empty columns in a matrix? Depending on the filtering in my slicers, some of my measures may not return any data for my selections. I'm not using the columns section ...
  • OwenAuger's avatar
    1 year ago

    Hi diablo908 

    A couple of options for you (sample PBIX attached):

    1. Create a calculation group with a calculation item for each measure
      1. Each calculation item expression is just a measure reference.
      2. Place the calculation item column in columns and an arbitrary measure in Values.
    2. Create a field parameter table "Measure Parameter" containing each measure.
      1. Create a measure "Measure Parameter Flag" that checks whether the measure corresponding to the "current" field parameter item is nonblank, and if so return 1.
      2. Add a TopN visual-level filter set to "Top 1 Measure Parameter by Measure Parameter Flag".
      3. This method relies on it being sufficient to check that the "total" of each measure is nonblank to decide whether to include it in the matrix.

    Do either of these methods work for you?