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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Koundinya
Frequent Visitor

Matrix Missing Values (Not solved after Using selecting Show Items with no data)

Hi, 

In my matrix table, I have values in columns and rows but when I select some brands from the slicer the matrix table is disappearing where are no values. Now, I want to see N/A where there are no values. I have tried with -

IF(ISBLANK(revenue), "N/A", revenue) but not working according to the requirement. Please find the screenshot

 

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

Hi  @Koundinya ,

I created the data:

v-yangliu-msft_0-1622711602986.png

Here are the steps you can follow:

1. Create a calculated table.

Table 2 = DISTINCT('Table'[Column])

v-yangliu-msft_1-1622711602989.png

Table 3 = SUMMARIZE('Table','Table'[Row])

v-yangliu-msft_2-1622711602991.png

2. The relationship between the table and the table

v-yangliu-msft_3-1622711602994.png

3. Create measure.

Flag = IF(MAX('Table'[Row]) in SELECTCOLUMNS('Table 3',"1",'Table 3'[Row]),IF(HASONEVALUE('Table'[Value]),SUM('Table'[Value]),"NA"),"NA")

4. Use Table3's [Row] as the slicer, open the matrix, place Table[Flag] to Values, Table[Row] to Row, and Table2[Column] to Columns

v-yangliu-msft_4-1622711602997.png

5. Result:

Select an option of the slicer, the correct value is displayed in the matrix, and the value that is not displayed is NA

v-yangliu-msft_5-1622711602999.png

 

Best Regards,

Liu Yang

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-yangliu-msft
Community Support
Community Support

Hi  @Koundinya ,

I created the data:

v-yangliu-msft_0-1622711602986.png

Here are the steps you can follow:

1. Create a calculated table.

Table 2 = DISTINCT('Table'[Column])

v-yangliu-msft_1-1622711602989.png

Table 3 = SUMMARIZE('Table','Table'[Row])

v-yangliu-msft_2-1622711602991.png

2. The relationship between the table and the table

v-yangliu-msft_3-1622711602994.png

3. Create measure.

Flag = IF(MAX('Table'[Row]) in SELECTCOLUMNS('Table 3',"1",'Table 3'[Row]),IF(HASONEVALUE('Table'[Value]),SUM('Table'[Value]),"NA"),"NA")

4. Use Table3's [Row] as the slicer, open the matrix, place Table[Flag] to Values, Table[Row] to Row, and Table2[Column] to Columns

v-yangliu-msft_4-1622711602997.png

5. Result:

Select an option of the slicer, the correct value is displayed in the matrix, and the value that is not displayed is NA

v-yangliu-msft_5-1622711602999.png

 

Best Regards,

Liu Yang

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

Greg_Deckler
Super User
Super User

@Koundinya What is not working?


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Hi @Greg_Deckler 

Please refer "before Filters" Image attached above we are seeing Corporate, Public, Small Business Before filters applied. But after selecting some Brands in Slicer Public and Small Business is disappearing from the table. Now the requirement is to sell Public and Small Business as we with N/A though they don't have values

@Koundinya Ah, now I see. Well, you are likely running into an issue related to DAX aggressively pre-filtering data as much as possible. But, incredibly difficult to tell. Would need the PBIX or sample data and the measure formula. 

 

Not really enough information to go on, please first check if your issue is a common issue listed here: https://community.powerbi.com/t5/Community-Blog/Before-You-Post-Read-This/ba-p/1116882

Also, please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.