Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Anonymous
Not applicable

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

measure code.pngCorrect visual.png

Wrong visual.png

1 ACCEPTED SOLUTION
harshnathani
Community Champion
Community Champion

Hi @Anonymous ,

 

 

1.jpg

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)

View solution in original post

2 REPLIES 2
harshnathani
Community Champion
Community Champion

Hi @Anonymous ,

 

 

1.jpg

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
Not applicable

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

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.