Skip to main content
cancel
Showing results for 
Search instead 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.

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

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
Microsoft Fabric Learn Together

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

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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