cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Reply
cosmicyes
Helper II
Helper II

Month to date for the current month ignoring all user-filters

I thought this would be easy but it isn´t 😉

 

I want to build a measure showing the month to date sales of the current month.
The measure should ignore all filters that a user sets.
So today the measure should show the sales from Sep 1 to Sep 21 - no matter whatever the user does.

 

My approach was to combine TOTALMTD and ALL in a meaningful way, but it doesn't work.

 

This is what I have been trying to do: (AllSales is a measure)

 

SalesMTD = 
TOTALMTD (
    [AllSales],
    ALL('MyCalendar'[Date]),
    MONTH ( 'MyCalendar'[Date] ) = MONTH ( TODAY () )
)


The result is always blank.
I tried a couple of more things but without success.

 

Can anybody help?

 

1 ACCEPTED SOLUTION
cosmicyes
Helper II
Helper II

I found a solution myself 🙂
It takes two steps now and maybe there is a (much) easier way.

 

First step:

 

SalesMTD = 
CALCULATE (
    [AllSales],
    DATESMTD ( 'MyCalendar'[Date] )
)

 

Second step:

 

TodaysSalesMTD = 
CALCULATE (
    [SalesMTD],
    'MyCalendar'[Date]
        = TODAY ()
)

 

The value I show now on the card-visual is TodaysSalesMTD.

View solution in original post

2 REPLIES 2
v-rongtiep-msft
Community Support
Community Support

Hi @cosmicyes ,

Does that make sense? If so, kindly mark your answer as the solution to close the case please. Thanks in advance.

 

Best Regards

Community Support Team _ Polly

 

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

 

cosmicyes
Helper II
Helper II

I found a solution myself 🙂
It takes two steps now and maybe there is a (much) easier way.

 

First step:

 

SalesMTD = 
CALCULATE (
    [AllSales],
    DATESMTD ( 'MyCalendar'[Date] )
)

 

Second step:

 

TodaysSalesMTD = 
CALCULATE (
    [SalesMTD],
    'MyCalendar'[Date]
        = TODAY ()
)

 

The value I show now on the card-visual is TodaysSalesMTD.

Helpful resources

Announcements
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors