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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply

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 @Wilianfilho_ps ,

 

 

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 @Wilianfilho_ps ,

 

 

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)

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

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors