cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills 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
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors