Forum Discussion
alsolok
Helper II
4 years agoLow performance measures
Hello everyone, I have the problem the performance on the measures: The measures is slow % modif = DIVIDE(CALCULATE([Nb clients], FILTER('Client', 'Client'[mail] = 1 && 'Client'[tel]=0 && '...
- 4 years ago
alsolok this is an optimized version for your code:
% modif = DIVIDE ( CALCULATE ( [Nb clients], KEEPFILTERS( FILTER ( ALL('Client'[mail], 'Client'[tel], 'Client'[date_modif] ), 'Client'[mail] = 1 && 'Client'[tel] = 0 && 'Client'[date_modif] <> BLANK () ) ), USERELATIONSHIP ( 'Agent'[id_agent], 'Client'[agent_modif] ), USERELATIONSHIP ( 'Emplacement'[libelle_empl], 'Client'[modif_CEB] ) ), CALCULATE ( [Nb clients], 'Client'[date_modif] <> BLANK () ), 0 )
Let me know if that helped.
SpartaBI
Community Champion
4 years agoalsolok this is an optimized version for your code:
% modif =
DIVIDE (
CALCULATE (
[Nb clients],
KEEPFILTERS(
FILTER (
ALL('Client'[mail], 'Client'[tel], 'Client'[date_modif] ),
'Client'[mail] = 1
&& 'Client'[tel] = 0
&& 'Client'[date_modif] <> BLANK ()
)
),
USERELATIONSHIP ( 'Agent'[id_agent], 'Client'[agent_modif] ),
USERELATIONSHIP ( 'Emplacement'[libelle_empl], 'Client'[modif_CEB] )
),
CALCULATE ( [Nb clients], 'Client'[date_modif] <> BLANK () ),
0
)
Let me know if that helped.