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

Get inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.

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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code FABINSIDER for a $400 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

Check out the February 2025 Power BI update to learn about new features.

March2025 Carousel

Fabric Community Update - March 2025

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

Top Kudoed Authors