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
Back2Basics
Helper IV
Helper IV

Matrix updating but keep columns

Hi, I have a matrix and a slicer on a page of the report. When an item is selected from the slicer the matrix updates with the filtered data - which is what I want - but the columns where there is no data are removed. I'm hoping to keep them in so that it is just the figures that update, so that it's easier for users to compare and visually see the difference between each item the select from the slicer. 

 

 

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

Hi @Back2Basics ,

According to your description, I create a sample.

vkalyjmsft_0-1655975437268.png

In my understanding, when the date slicer select 2022/6/1, you also want to display Item C even though there's no value.

vkalyjmsft_1-1655975692074.png

Here's my solution.

1.Create a new table, don't make relationship between the two tables.

Table 2 = VALUES('Table'[Item])

2.Create a measure.

Sales Measure =
VAR _V =
    MAXX (
        FILTER (
            ALL ( 'Table' ),
            'Table'[Date] = SELECTEDVALUE ( 'Table'[Date] )
                && 'Table'[Item] = MAX ( 'Table 2'[Item] )
        ),
        'Table'[Sales]
    )
RETURN
    IF ( _V = BLANK (), BLANK (), _V )

Put the Item from the new table in the matrix Rows and the measure in the Values, then checked the Show items with no data.

vkalyjmsft_2-1655976532242.png

Get the result.

vkalyjmsft_3-1655976666106.png

I attach my sample below for reference.

 

Best Regards,
Community Support Team _ kalyj

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

 

View solution in original post

4 REPLIES 4
v-yanjiang-msft
Community Support
Community Support

Hi @Back2Basics ,

According to your description, I create a sample.

vkalyjmsft_0-1655975437268.png

In my understanding, when the date slicer select 2022/6/1, you also want to display Item C even though there's no value.

vkalyjmsft_1-1655975692074.png

Here's my solution.

1.Create a new table, don't make relationship between the two tables.

Table 2 = VALUES('Table'[Item])

2.Create a measure.

Sales Measure =
VAR _V =
    MAXX (
        FILTER (
            ALL ( 'Table' ),
            'Table'[Date] = SELECTEDVALUE ( 'Table'[Date] )
                && 'Table'[Item] = MAX ( 'Table 2'[Item] )
        ),
        'Table'[Sales]
    )
RETURN
    IF ( _V = BLANK (), BLANK (), _V )

Put the Item from the new table in the matrix Rows and the measure in the Values, then checked the Show items with no data.

vkalyjmsft_2-1655976532242.png

Get the result.

vkalyjmsft_3-1655976666106.png

I attach my sample below for reference.

 

Best Regards,
Community Support Team _ kalyj

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

 

Anonymous
Not applicable

Hi @Back2Basics 

You can pivot the column and then use the newly created columns in matrix.

That way it wont disappear after slicer selection.

 

Thanks @Anonymous - sorry can you explain a bit more about how to do this? 

Anonymous
Not applicable

@Back2Basics Pivot the column as suggested here- Pivot your Data using Power Query - Microsoft Power BI Community

And then add the columns to the matrix visual.

 

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.