Forum Discussion

patxifunes's avatar
patxifunes
New Member
2 years ago

Performance problems with what-if parameter

Hi, 

I have an important performance using a what-if parameter. The formula below works reasonably well considering that the LLAMADAS table have millions of rows:

RACS.CALCULATE(
    COUNTROWS(
        FILTER(
            SUMMARIZE('Llamadas', LLAMADAS[FK_MATRICULA], "ATEND", LLAMADAS[Llamadas Atendidas]),
            [ATEND] > 150
        )
    )
 
However, when I substitute the threshold of 150 by a what-if parameter the measure doesn't work:
 
RACS. =
    VAR minLlm = [Umbral Llm]
    RETURN CALCULATE(
    COUNTROWS(
        FILTER(
            SUMMARIZE('Llamadas', LLAMADAS[FK_MATRICULA], "ATEND", LLAMADAS[Llamadas Atendidas]),
            [ATEND] > minLlm
        )
    )
)
)

4 Replies

  • Hi, I am not sure your how your parameter table looks like, but I try to create a numeric range parameter like below.

     

    It shows that the measure that automatically created is described with the word "Value".

     

     

     

    For the VAR inside the measure you created, please try use the measure directly or use MAX DAX function with the column.
    Something like the below picture.

     

     

     

  • Actually I am using the parameter threshold Value:


    I have tested using MAX('Min Llamadas Atendidas'[Min Llamadas Atendidas]) but It doesn't work:


    Using the fixed threshold It works ok:

     



     



    • Jihwan_Kim's avatar
      Jihwan_Kim
      Super User

      Hi,

      Could you please click to see the detail of the error? This helps to understand what is not properly configured.

      • patxifunes's avatar
        patxifunes
        New Member

        Insufficient resources... but I am using a direct query source.