Forum Discussion

alsolok's avatar
alsolok
Icon for Helper II rankHelper II
4 years ago
Solved

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 && '...
  • SpartaBI's avatar
    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.





          

    Showcase Report – Contoso By SpartaBI