cancel
Showing results 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.

Helper V

## Blank Rows in Matrix still showing up

Hi,

So I have a visual with multiple measures created and I've implemented a method to hide and show the measures based on a measure selector, based on the following youtube --> https://www.youtube.com/watch?v=OIGGrrnMIgk&ab_channel=BIElite

Each measure has the following Logic:
Measure =
VAR LogicTest =
COUNTROWS(DISTINCT(
FILTER(ALLSELECTED(Measures[Selection]),
Measures[Selection] = "Measure1"
)

)) = 1

RETURN
IF(
LogicTest, [Sum of Measure 1],BLANK()
)

Unlike the video, I wanted it done in a matrix. The problem is while the value of the measure goes blank, the measure name in the matrix sticks around so there's just a whole row of blanks. Is there a way to implement this so the whole row is blank?

So the first is with all measures selected so it shows both Measure 1 & 2, the second is with only measure 2 selected. Ideally if I have Measure 2 selected, then the row for Measure 1 should be completely blank not just the values.

Thanks

4 REPLIES 4
Super User

@id013 are you using shows on rows in Matrix visual or measure 1 and measure 2 are actual columns from the disconnected tables?

Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤

Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Helper V

Hi,

Yes I'm using show on  rows. However I've found that it is blank whether I use on rows or not. Measure 1 and Measure are created measures.

Thanks

Helper V

So I tried a different way to do this, instead for I'm calculating the measure as follows:

=SWITCH(SELECTEDVALUE(measures[selection]),"Measure1",[Sum of Measure 1],"Measure 2",[Sum of Measure 2], BLANK())

This behaves in the manner that I want where 1) any blank rows don't show up and 2) All the measures are grouped under the Year like the following:
 2019/2020 2020/2021 Store1 Measure1 Measure2 Measure1 Measure2 Store2 Measure1 Measure2 Measure1 Measure2 Store3 Measure1 Measure2 Measure1 Measure2

The only Issue I have now is the the total row at the bottom doesn't total anything up for the selected measures. Is there any way to do this with the total row actually working?

Thanks

Community Support

Hi @id013

Is your issue that the total row in your matrix show nothing if you use the new measure?

I build a sample to have a test, and my result show totals well.

I think this may be caused by your measures, [Sum of Measure1] and [Sum of Measure2].

You can try to add only [Sum of Measure1] or [Sum of Measure2] into value field in your matrix and check whether these two measures will return total correctly.

You can try to sum your measure, and normally the total row will return corret result.

For example:

``Sum [measure1] = sumx(Table, [Sum of Measure1])``

Best Regards,

Rico Zhou

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Announcements

#### 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

#### Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

#### Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors