Forum Discussion
MarcosVME
2 years agoNew Member
Problem with dax query time
Hey guys, I am having processing problems in a dax query below: FLEX_METRICA_CALCULO_MERCADOMARCA_AREA_VISITADA = var vfilter = FILTER( VEEVA_D_FORCA_DE_VENDAS ,not ISBLANK(VEEVA...
OwenAuger
2 years agoSuper User
Hi MarcosVME
Based on what you've posted, I would recommend turning vfilter into a column filter within the CALCULATE expression directly.
Something like this:
FLEX_METRICA_CALCULO_MERCADOMARCA_AREA_VISITADA =
CALCULATE (
[FLEX_METRICA_CALCULO_MERCADO_AREA_VISITADA],
USERELATIONSHIP ( D_MARCA[MERCADO], IM_D_MERCADO_FRANQUIA[MERCADO] ),
KEEPFILTERS ( NOT ISBLANK ( VEEVA_D_FORCA_DE_VENDAS[COD_SETOR] ) )
)
Generally performance is better with filters on columns rather than tables, and use KEEPFILTERS if the filter needs to intersect with the current filter context.
Does the above measure improve performance and still produce expected results?
Regards