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
AndySmith
Helper II
Helper II

Month Slicer/Filter not working

Hi

 

I am working wit tabular model and the data comes via our datawarehouse. There are fact tables connected to a date table. Linked by Date Value.

When I bring in Year Month as the rows (for example), all my YTD functions do not work, and they will instead show the value for each month.

When I just use the date field - the YTD amounts calculate correcly. Why would my month slicer be casuing these issues?

 

AndySmith_0-1713768307389.png

 

1 ACCEPTED SOLUTION

Hey @AndySmith ,
I tried to replecate on my model.
It looks good to me.
I tried TOTALYTD([Qty], 'Date'[Date], "30/06") -> Comm (1)

and 

CALCULATE(
        [Qty],
        DATESYTD('Date'[Date], "30/06")
) -> Comm (2)

sergej_og_0-1713875016032.png

Seems to be smtg with your fields in your Date table.
What is "Date Value" represents?

Regards

View solution in original post

4 REPLIES 4
AndySmith
Helper II
Helper II

Thanks for the reply. The left hand table - which uses dates as teh rows works fine. Its when I bring in months that the YTD no longer works. I woul dexpect that when Months are applied in the rows - the YTD formual would still calc. - so it would a running total of the month sales. 

YTD formula is simple : 

CALCULATE(SUM('Fact Table'[Qty 9LE]),DATESYTD('Date'[Date Value],"30/06"))

 

Hey @AndySmith ,
I tried to replecate on my model.
It looks good to me.
I tried TOTALYTD([Qty], 'Date'[Date], "30/06") -> Comm (1)

and 

CALCULATE(
        [Qty],
        DATESYTD('Date'[Date], "30/06")
) -> Comm (2)

sergej_og_0-1713875016032.png

Seems to be smtg with your fields in your Date table.
What is "Date Value" represents?

Regards

Thanks. There was mismatch of data types for the date field. ALl fixed. Thanks agin

sergej_og
Super User
Super User

 I can see on the left hand side your date is accumulated with a month.
You can see there is a break between 30/06/2023 and 01/07/2023.
June is ready accumulated then july starts with accumulation.
Therefore it seems to give you a correct result on the month-level.

What is your intension / expectation on the result of your YTD?
Can you pls provide your YTD formula?

Regards

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.