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
Alexis-Edin
Regular Visitor

Create a measure witout filters

Hi everybody, 

I'm wondering if it's possible to create a measure without the filters which are in the rapport. 
Better explanations : 
My tables are filtering by a year table, in my case is 2021. So my measures are filtered to. 

But I would like to remove this filter and put a new one only in the new measure.

I tried this :


test =
CALCULATE (
COUNT ( 'Utilisation des offres'[Clé primaire NIA + Annéee + ID Offre] ),
FILTER ( Offre_ID, Offre_ID[ID_Offre] = 8 ),
FILTER ( Type_OD, Type_OD[ID_typeOD] = "1" ),
ALL( 'Utilisation des offres'[ID_annee] ),
FILTER( 'Utilisation des offres', 'Utilisation des offres'[ID_annee] = [Id_Année_mesure] )
) / [NB_actifs_filtres]

"Id_année mesure" correspond to the year 2022.

The result is "ampty"

Thank in advance for your help

 

 

1 REPLY 1
v-yangliu-msft
Community Support
Community Support

Hi  @Alexis-Edin ,

 

You can try using ALLSELECTED() instead of ALL()

The ALLSELECTED function removes context filters from columns and rows in the current query, while retaining all other context filters or explicit filters.

ALLSELECTED function (DAX) - DAX | Microsoft Learn

test =
CALCULATE (
COUNT ( 'Utilisation des offres'[Clé primaire NIA + Annéee + ID Offre] ),
FILTER ( Offre_ID, Offre_ID[ID_Offre] = 8 ),
FILTER ( Type_OD, Type_OD[ID_typeOD] = "1" ),
ALLSELECTED( 'Utilisation des offres'[ID_annee] )
) / [NB_actifs_filtres]

If I have misunderstood your meaning, please provide your pbix file without privacy information and desired output.

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

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