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
LynnM
Frequent Visitor

Creating month to date metrics from YTD data source

Hello,

 

I am literally pulling my hair out! My source data is YTD . I managed to create month only data but have run into an issue when I try to create a Full Year Budget. How can I show a full year budget that will not change with the date slicer?

 

Thanks in advance

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

Hi @LynnM ,

 

I suggest you to to try REMOVEFILTER() or ALL() function in your code. You can create a Dimdate table with continuous date ,then create a relationship between 'Data'[Date] and 'DimDate'[Date] and create a measure.

Measure:

 

YTD remove filter =
CALCULATE (
    SUM ( 'Data'[Value] ),
    FILTER ( ALL ( 'Date' ), 'Date'[Year] = YEAR ( TODAY () ) )
)

 

 

Best Regards,
Rico Zhou

 

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

Thank you! This worked.

View solution in original post

3 REPLIES 3
v-rzhou-msft
Community Support
Community Support

Hi @LynnM ,

 

I suggest you to to try REMOVEFILTER() or ALL() function in your code. You can create a Dimdate table with continuous date ,then create a relationship between 'Data'[Date] and 'DimDate'[Date] and create a measure.

Measure:

 

YTD remove filter =
CALCULATE (
    SUM ( 'Data'[Value] ),
    FILTER ( ALL ( 'Date' ), 'Date'[Year] = YEAR ( TODAY () ) )
)

 

 

Best Regards,
Rico Zhou

 

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

Thank you! This worked.

indkitty
Helper II
Helper II

Hi Lynn,

If measure is on filter, remove filter.

Filtering Tables in DAX - SQLBI

Could you post sample data?

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.