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
GKJARC
Resolver I
Resolver I

Filter matrix only 1 row in matrix

Hi everyone,


I have a matrix table with a multiple row hierarchy. All the rows should appear like usual, even if the pertinent values are blank or 0. Except for the last row in the hierarchy, if that has blank or 0, it should not appear.

 

For example:

Drilldown from Journey  Fuel used
- Journey 2024001   270
    - Leg 1 start: 16-02-2024   170
          Main engine   150
          Auxiliary engine     20
    - Leg 2 start: 27-02-2024   100
          Main engine   100
          Auxiliary engine       0
- Journey 2024002   250
    - Leg 1 start: 08-03-2024   250
          Main engine   200
          Auxiliary engine     50
      Leg 2 start: 12-03-2024       0
          Main engine       0
          Auxiliary engine       0
+ Journey 2024003   200
+ Journey 2024004   250
+ Journey 2024005   150


Highlighted red is what I'd like not to appear in the matrix table.

  • 'Leg 2 start: 27-02-2024' should only show the row of Main engine, as the Auxiliary engine has used 0 fuel in this leg.
  • 'Leg 2 start: 12-03-2024' should not be expandable at all (if possible), because both underlying engines have used no fuel. I do need the leg itself to remain visible even though the total fuel used for this leg is 0.

Any help would be much appreciated, thanks!

2 ACCEPTED SOLUTIONS

@AUDISU  Thanks for your contribution on this thread.

Hi @GKJARC ,

You can follow the steps below to get your expected result, please find the details in the attachment.

1. Create a measure as below

Measure = IF ( SUM ( 'Table1'[Amount] ) = 0, BLANK (), SUM ( 'Table1'[Amount] ) )

2. Replace the field in Values option with the above new measure just as below screenshot

vyiruanmsft_0-1711554242064.png

Best Regards

Community Support Team _ Rena
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

Hi @v-yiruan-msft ,

The help is appreciated however it is actually not a solution to what was asked. Only the level of consumption should be filtered, not the legs themselves. The offered solution removes also the legs if there is 0 consumption. as you can see, the leg of 12-3 is entirely missing from the visual with the proposed measure.
The legs should be shown even when there has been no consumption in a leg, it is still an event that is part of a voyage therefore it is in this case important that it remains visible.

View solution in original post

4 REPLIES 4
GKJARC
Resolver I
Resolver I

@AUDISU Please find the PBIX sample file with the following WeTransfer link:
https://we.tl/t-qxX9wcgi5N

@AUDISU  Thanks for your contribution on this thread.

Hi @GKJARC ,

You can follow the steps below to get your expected result, please find the details in the attachment.

1. Create a measure as below

Measure = IF ( SUM ( 'Table1'[Amount] ) = 0, BLANK (), SUM ( 'Table1'[Amount] ) )

2. Replace the field in Values option with the above new measure just as below screenshot

vyiruanmsft_0-1711554242064.png

Best Regards

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

Hi @v-yiruan-msft ,

The help is appreciated however it is actually not a solution to what was asked. Only the level of consumption should be filtered, not the legs themselves. The offered solution removes also the legs if there is 0 consumption. as you can see, the leg of 12-3 is entirely missing from the visual with the proposed measure.
The legs should be shown even when there has been no consumption in a leg, it is still an event that is part of a voyage therefore it is in this case important that it remains visible.

AUDISU
Resolver III
Resolver III

Hi @GKJARC ,
You can achive this using INSCOPE function.
Please share  sample data. Then I can create DAX query exactly you want.
Thanks.

 

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.