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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
GGuru
New Member

Is it possible to use a non-context measure?

Hi!

 

The table below shows the number of active contracts (#) at previous month ends (Månad) for a particular customer, the original end date of the contracts ("**bleep**") and in which month the contracts actually ended - if ended (max). Based on this information I can create a measure to calculate the average number of days/months between the termination date and the original end date for the contacts that have been terminated before February 2023.

GGuru_0-1711106656883.png

As a next step I would like to use this average to calculate the estimated termination date (Beräknat slutdatum) for the contracts that are still active in February 2023. So, if, for example, the average contract (based on the previous measure) is terminated 150 days before the original end date (ÅrMånadSlut), and the end date is October 31st the estimated termination month would be May 2024, if the end date is in February 2025, the estimated termination month would be September 2024 and so on. So in the example below, the estimated termination date would be five months before the value in the ÅrMånadSlut-column. But I can’t find a way to use the measure (that was calculated for the contracts terminated before February 2024) as this visual only handles the contracts that are still active in February. Is it possible to use a “non-context” measure like that or is there another way to achieve this?

 

GGuru_1-1711106795134.png

 

 

1 ACCEPTED SOLUTION
sjoerdvn
Super User
Super User

Measures are all about context: page filters, slicers, rowcontext alltogether determine the resulting context. However, any part of context can be expanded or filtered further down using CALCULATE. If you create a measure, e.g. [averge months active] you can have that ignore all context by using CALCULATE([average months active], ALL())

View solution in original post

2 REPLIES 2
sjoerdvn
Super User
Super User

Measures are all about context: page filters, slicers, rowcontext alltogether determine the resulting context. However, any part of context can be expanded or filtered further down using CALCULATE. If you create a measure, e.g. [averge months active] you can have that ignore all context by using CALCULATE([average months active], ALL())

Ah, thanks. That's great. Wasn't aware of the () for the ALL. 

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors