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
Anonymous
Not applicable

Dynamic Filtering

Hello All,

 

I've got a report with cumulative data on a chart along with a card that displays the total obligations.

 

 

themanjk08_0-1656089104912.png

 

The only way to get the card to display the correct amount is to do a relative filter to show items in the current month. Without the filter, the card will display the sum of all cumulative monthly totals (~$5b) which is incorrect. 

themanjk08_1-1656089183956.png

 

If I select a month on the chart, the card does not update since it already has a filter for items in the current month.

themanjk08_2-1656089309572.png

 

I'm looking for a solution that allows the "Total Obligations" card to default to filtering for the current month until a month is selected on the chart. Then the filter would change to selected month. I don't know if this can be done, but I'm open to any suggestions. 

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

Hi @Anonymous ,

 

Please try this measure.

Total Obligations =
CALCULATE (
    SUM ( 'Table'[Obligations] ),
    FILTER (
        ALL ( 'Calendar' ),
        'Calendar'[MonthNum]
            = SELECTEDVALUE ( 'Calendar'[MonthNum], MONTH ( TODAY () ) )
    )
)

By default the current month is filtered until a month is selected on the graph.

vcgaomsft_0-1656381857108.png

vcgaomsft_1-1656381883786.png

Attached PBIX file for reference.

 

Best Regards,
Gao

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly -- How to provide sample data

View solution in original post

2 REPLIES 2
v-cgao-msft
Community Support
Community Support

Hi @Anonymous ,

 

Please try this measure.

Total Obligations =
CALCULATE (
    SUM ( 'Table'[Obligations] ),
    FILTER (
        ALL ( 'Calendar' ),
        'Calendar'[MonthNum]
            = SELECTEDVALUE ( 'Calendar'[MonthNum], MONTH ( TODAY () ) )
    )
)

By default the current month is filtered until a month is selected on the graph.

vcgaomsft_0-1656381857108.png

vcgaomsft_1-1656381883786.png

Attached PBIX file for reference.

 

Best Regards,
Gao

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly -- How to provide sample data

Anonymous
Not applicable

Gao, you're a beast. Thanks for the help!

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.

Top Solution Authors