Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
BHarm65
Frequent Visitor

Create measure that only uses year from date slicer

Hi,

 

Can anyone give me a hint how I can create a measure that I can use in a matrix visual that only will respond to the year in the date slicer.

 Case:

I have a matrix that displays the actuals, YTD actuals, Budget and Budget YTD of a selected period (months or quaters)

See example below

BHarm65_0-1700483222494.png

I want to add a measure in the matrix that will dispay the total year budget of the selected year in the period.

I tried to create a measure that only will respond to the year of the selected period.

I created this measure: Total Budget = CALCULATE(SUM(pbi_budgets[Data.pbi_budget]),KEEPFILTERS('Calendar'[Year]))
But it still respond to the quater instead of only the Year

BHarm65_1-1700483705776.png

 

Is there a way to create a measure that only wil respond / calculate based on the year and not the quater.

 

 

 

 

1 ACCEPTED SOLUTION
DataInsights
Super User
Super User

@BHarm65,

 

Try this measure. It clears filters on the Calendar table, while retaining the Year filter.

 

Total Budget =
CALCULATE (
    SUM ( pbi_budgets[Data.pbi_budget] ),
    ALL ( 'Calendar' ),
    VALUES ( 'Calendar'[Year] )
)

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

2 REPLIES 2
BHarm65
Frequent Visitor

Thank you very much for the solution.😀

DataInsights
Super User
Super User

@BHarm65,

 

Try this measure. It clears filters on the Calendar table, while retaining the Year filter.

 

Total Budget =
CALCULATE (
    SUM ( pbi_budgets[Data.pbi_budget] ),
    ALL ( 'Calendar' ),
    VALUES ( 'Calendar'[Year] )
)

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
July 2024 Power BI Update

Power BI Monthly Update - July 2024

Check out the July 2024 Power BI update to learn about new features.

July Newsletter

Fabric Community Update - July 2024

Find out what's new and trending in the Fabric Community.