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

Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now

Reply
irishboy79
Frequent Visitor

Is it possible to filter a Matrix by subtotals using DAX?

Hi

 

I have been struggling to resolve the following and I hope somebody has the knowledge to help?

 

I am trying to find the count of days when all items of stock are in stock.

 

For example: 

 

Using a matrix to show:

 

StockItem           02-03-18         03-03-18        04-03-18

seat                           1                                            1

cover                         1                                            1

mirror                                                1                    1

Total                          2                      1                    3              

 

Where the value 1 denotes that they are in stock.

 

Using this example, I am looking to be able to calculate the result of 1 day i.e.  the count of days with all stock in in stock, 04-03-18

 

If I excluded the stock item of mirror, teh answer would be 2 i.e. 2 days have all stock items in stock 02-03-18 ans 04-03-18

 

StockItem           02-03-18         03-03-18        04-03-18

seat                           1                                            1

cover                         1                                            1

Total                          2                                            2

 

I have tried many attempts but I am unable to find teh right solution.

 

I hope this makes sense and that somebody can help please?

 

Many Thanks in advance...

 

 

 

2 REPLIES 2
v-chuncz-msft
Community Support
Community Support

@irishboy79,

 

You may take a look at this post.

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thank you Sam for the reply.

 

Unfortunately the measure does not give me the value that I was after.

 

 

Capture.PNG

 

Using the above example, I am looking to show only the column highlighted because it is the only column that has a value for both rows. So using a Card, it would show the value 1.

 

Although the number of rows can be calculated, I haven't been able to get the count of columns where the sub total = the count of rows...

 

 

 

 

Helpful resources

Announcements
OCT PBI Update Carousel

Power BI Monthly Update - October 2024

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

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

October NL Carousel

Fabric Community Update - October 2024

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