Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Measure doesn't calculate dinamically

Hi guys, 

I created a measure and it should be calculated a RANKX dinamically in the visual when I change the slicer (date field) , however it is not work. Somebody can help me to solve this?

I attached a pbix file with an example. Download pbix file 

Tks!

 

it is the Measure Code

  • Anonymous's avatar
    Anonymous
    6 years ago

    Hi Anonymous ,

     

     

    Create these 2 measures

     

    Total Vendas Sum = SUM(Vendas[TotalVendas])
     
    RANKI =
    IF(NOT(ISBLANK([Total Vendas Sum])),
    RANKX (
            FILTER(
                ALLSELECTED(
                    'Vendas'[Grupo],Vendas[Nome Cliente]),
                'Vendas'[Grupo] = MAX(Vendas[Grupo])
                ),
                CALCULATE(SUM(Vendas[TotalVendas]))
                ))
     
     

    Regards,
    Harsh Nathani

    Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)

2 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Anonymous ,

     

     

    Create these 2 measures

     

    Total Vendas Sum = SUM(Vendas[TotalVendas])
     
    RANKI =
    IF(NOT(ISBLANK([Total Vendas Sum])),
    RANKX (
            FILTER(
                ALLSELECTED(
                    'Vendas'[Grupo],Vendas[Nome Cliente]),
                'Vendas'[Grupo] = MAX(Vendas[Grupo])
                ),
                CALCULATE(SUM(Vendas[TotalVendas]))
                ))
     
     

    Regards,
    Harsh Nathani

    Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)

    • Anonymous's avatar
      Anonymous
      Not applicable

      That's all Harsh, tks a lot for your help. It worsk!!!