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

Shape the future of the Fabric Community! Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions. Take survey.

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
November Carousel

Fabric Community Update - November 2024

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

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.

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.