Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
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
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.
User | Count |
---|---|
102 | |
91 | |
85 | |
77 | |
71 |
User | Count |
---|---|
113 | |
105 | |
101 | |
75 | |
64 |