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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

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