Forum Discussion
Low 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 && '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).
I search the solution to performance.
Do you have the alternative optimized
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.
2 Replies
- SpartaBICommunity Champion
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. - v-zhangtiCommunity Support
Hi, alsolok
Can you provide some sample data or simple pbix files? Sensitive information can be removed in advance. What kind of expected results do you expect? You can also show it with pictures.
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.