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
LD1
Helper III
Helper III

TOP RANK in a visuel card : Doesn't work

Hi everyone ! 

 

I try to apply my RANK formula in a visuel card but filter doesn't work : 

 

Here is the explication :

 

1. Display the TOP CA € value in the card => thanks to the filter "TOP 20" (but here it is not synchronised (??))

2. I tried to apply with a filter in right position of the screen (on the field "CA N DATE"). But PowerBI blocks this possibility

LD1_0-1681465292057.png

 

I just want to display the TOP result (Depending on the filter selection "TOP" on the left of the screenshot.

 

Can you think is it possible to figure it out with me ? Or better way, find the solution to do it? 

 

Thank you and have a good day !

 

Léna

 

1 ACCEPTED SOLUTION

Hi @LD1 ,

Please refer to my pbix file.

Create a column.

Column = RANKX('Table','Table'[value],,DESC,Dense)

 

Then create a measure.

measure = var _selected=SELECTEDVALUE('Table (2)'[value])
return
 SUMX(
        TOPN(
            _selected, 
            SUMMARIZE(
                    'Table', 
                    'Table'[Column], 
                    "TotalSales", SUM('Table'[value])
            ),
            [TotalSales], DESC
        ),
        [TotalSales]
)

 

vrongtiepmsft_3-1681881291420.png

 

How to Get Your Question Answered Quickly 

 

If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .

 

Best Regards
Community Support Team _ Rongtie

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
v-rongtiep-msft
Community Support
Community Support

Hi @LD1 ,

Do you want all data to appear in the card? Instead of in sum form?

Please refer to my pbix file to see if it helps you.

vrongtiepmsft_0-1681696213703.png

How to Get Your Question Answered Quickly 

 

If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .

 

Best Regards
Community Support Team _ Rongtie

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi @v-rongtiep-msft ! 

First of all, thank you for your return. 

It's not quite right, yes i would like to show only the Total line (or like you say the Sum of column). But the problem it's the formula RANK which is working only with the line data & the filter TOP 10, or TOP 20... it depend on the selection. 

 

I hope i am clear. It seems surprising not to be able to display this data without the data line. 

I can't apply a special filter like you "The top 5" in filter on the right because the value changes anytime according to the "FILTER TOP" in segment. 

 

Thank you in advance for your return and have a good day, 

 

Léna

Hi @LD1 ,

Please refer to my pbix file.

Create a column.

Column = RANKX('Table','Table'[value],,DESC,Dense)

 

Then create a measure.

measure = var _selected=SELECTEDVALUE('Table (2)'[value])
return
 SUMX(
        TOPN(
            _selected, 
            SUMMARIZE(
                    'Table', 
                    'Table'[Column], 
                    "TotalSales", SUM('Table'[value])
            ),
            [TotalSales], DESC
        ),
        [TotalSales]
)

 

vrongtiepmsft_3-1681881291420.png

 

How to Get Your Question Answered Quickly 

 

If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .

 

Best Regards
Community Support Team _ Rongtie

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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