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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
smanderson
Frequent Visitor

Removing filter context from calendar hierarchy

Here's an example of the issue with some dummy data:

 

I am adding annual projections to a number that is a sum from a different table. 

I have historical data that is aggregated monthly

 

I've made a measure that adds the annual projection adjustments to the current value, but the filter context is still monthly when you drill down.  That means that only the months that hold the actual projeciton are reduced and the others are left at the scalar value. 

 

I would like the projection to evaluate in a yearly context no matter what level of drill down is selected. 

 

I've experimented with REMOVEFILTERS and CALCULATE , but I haven't found the right formula that would result in a sloped line instead of downward spikes whenever the projection month shows up. 

 

The formulat I'm using so far for the measure is:

Adjusted projected capacity =
SUM('Bus capacity'[Seating Capacity]) + SUM('Proejction'[Projected seating reduction])

 

smanderson_1-1629759454596.png

smanderson_2-1629760085377.png

 

 

 

 

 

1 ACCEPTED SOLUTION
Greg_Deckler
Super User
Super User

@smanderson ALLEXCEPT('Calendar'[Year]) ?



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

3 REPLIES 3
Greg_Deckler
Super User
Super User

@smanderson ALLEXCEPT('Calendar'[Year]) ?



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

@Greg_Deckler 

 

That was certainly better than anything I had tried so far. 

 

It resullted in a stepped line.  Is there a way to make it a gradual slope the same way it would look if the viz was aggregated by year instead of steps? 

 

smanderson_0-1629816330979.png

 

@smanderson Hmm. Well, one way would be to add a trend line. The other way you could compute the y-intercept and slope of the line and then return points using that line equation.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

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 MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.