Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply

Hiding measure rows in matrix visual

Hi all,

 

I am making a matrix visual and adding measures to the values field in the visualization fields. I only want to show measures with non blank rows. How can I do that? Is there a measure through which I can do it? I would really appreciate feedback on how this can be done or for any other alterntive approach. I have attached my matrix visual aling with the table structure in the images below. The values in the pictures are random and are for illustrative purposes only.

 

Capture.PNG

Capture.PNG

 

 

1 ACCEPTED SOLUTION
v-gizhi-msft
Community Support
Community Support

Hi,

 

Please take following steps:

1)Create a new calculated table:

Table = 
CROSSJOIN (
    DISTINCT ( SELECTCOLUMNS ( 'Master', "HEAD", Master[ROW 1] ) ),
    DATATABLE (
        "MEASURE", STRING,
        {
            { "Measure 1" },
            { "Measure 2" },
            { "Measure 3" },
            { "Measure 4" }
        }
    )
)

2)Try this measure:

Measure = 
SWITCH (
    SELECTEDVALUE ( 'Table'[MEASURE] ),
    "Measure 1", [Measure 1],
    "Measure 2", [Measure 2],
    "Measure 3", [Measure 3],
    "Measure 4", [Measure 4]
)

3)The result shows:

15.PNG

Here is my test pbix file:

pbix 

Hope this helps.

 

Best Regards,

Giotto

View solution in original post

6 REPLIES 6
v-gizhi-msft
Community Support
Community Support

Hi,

 

Please take following steps:

1)Create a new calculated table:

Table = 
CROSSJOIN (
    DISTINCT ( SELECTCOLUMNS ( 'Master', "HEAD", Master[ROW 1] ) ),
    DATATABLE (
        "MEASURE", STRING,
        {
            { "Measure 1" },
            { "Measure 2" },
            { "Measure 3" },
            { "Measure 4" }
        }
    )
)

2)Try this measure:

Measure = 
SWITCH (
    SELECTEDVALUE ( 'Table'[MEASURE] ),
    "Measure 1", [Measure 1],
    "Measure 2", [Measure 2],
    "Measure 3", [Measure 3],
    "Measure 4", [Measure 4]
)

3)The result shows:

15.PNG

Here is my test pbix file:

pbix 

Hope this helps.

 

Best Regards,

Giotto

Anonymous
Not applicable

Please @v-gizhi-msft , could you add again the file? It seems that link is broken. 

Thank you. 

 

 

Hi! I can not download pbix. Error NOT FOUND 404.Could you please upload again?

thank you so much

amitchandak
Super User
Super User

@commonsenseuser 

You can create measure with all except, which represent row total and use that as a filter in visual

Refer , how to create:https://www.sqlbi.com/articles/managing-all-functions-in-dax-all-allselected-allnoblankrow-allexcept...

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here
Pragati11
Super User
Super User

Hi @commonsenseuser ,

 

You must have created calculations for your Measure1, Measure2, Measure3, Measure 4 using DAX calculation.

As you haven't shared formula for your above measures, I can add that, in your measure calculation, try to calculate only NON BLANK results.

If you can share your Measure calculations, it's easy to highlight the change.

 

If this helps and resolves the issue, appreciate a Kudos and mark it as a Solution! 🙂

 

Thanks,

Pragati

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Proud to be a Super User!!

Thank you for the reply. 

 

Here is a measure that I am using for this matrix:

 

Measure 1 = CALCULATE(SUM(Master[Value]), FILTER(Master, Master[COLUMN 1] = "Value 1"))

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.