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

Automatic Month Change on Dial Gauge Date Filter

Hi, 

 

I was just wondering if anyone can advise on how to set an automatic filter on Dial Guage on Date filter to change automatically when Month-end and set the sales to zero i.e, sum(Sales) which give total sales.

i.e I have a column with Total Sales and  Sales Date, I want the sales to reset to zero automatically once a new month start.

At the end of the month 31/10/2019:         Oct Total Sales = $100 

At the beginning of the Month 0/11/2019: Nov Total sales = $ 0

Thanks so much 

 

2 ACCEPTED SOLUTIONS
v-shex-msft
Community Support
Community Support

HI @MYDATASTORY ,

According to your description, It sounds like you want to achieve monthly rolling calculation on gauge visual. You can try to write a measure with conditions on month and date based on selected date:

Measure =
VAR currDate =
    MAX ( Date[Date] ) // seleceted calendar date
RETURN
    CALCULATE (
        SUM ( 'Table'[Sales] ),
        FILTER (
            ALLSELECTED ( Table ),
            'Table'[Date] <= currDate
                && MONTH ( Table[Date] ) = MONTH ( currDate )
        )
    )

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

View solution in original post

really great and Thanks so much😀

View solution in original post

2 REPLIES 2
v-shex-msft
Community Support
Community Support

HI @MYDATASTORY ,

According to your description, It sounds like you want to achieve monthly rolling calculation on gauge visual. You can try to write a measure with conditions on month and date based on selected date:

Measure =
VAR currDate =
    MAX ( Date[Date] ) // seleceted calendar date
RETURN
    CALCULATE (
        SUM ( 'Table'[Sales] ),
        FILTER (
            ALLSELECTED ( Table ),
            'Table'[Date] <= currDate
                && MONTH ( Table[Date] ) = MONTH ( currDate )
        )
    )

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

really great and Thanks so much😀

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.