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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
uj91
Helper I
Helper I

To show bottom 10 using field parameters and only show unique values and not consider 0 and 1 value.

I have below table with two columns - 1. Keyword (Dimension) 2. Field Parameter ( Impression , Clicks , Spend) 

uj91_1-1765517754265.png

 

Field Parameter is as follows: 

Search Insights = {
    ("Impressions", NAMEOF('Reporting.Search'[Total Impressions_Search]), 0),
    ("Clicks", NAMEOF('Reporting.Search'[Total Clicks_Search]), 1),
    ("Spend", NAMEOF('Reporting.Search'[Total Media Cost_Search]), 2)
}

I need to show bottom 10 values in the table considering field parameter is being used and also somehow only showing unique values and not considering 0 and 1 values. Any suggestion ? 


1 ACCEPTED SOLUTION

Update the final measure with the below 

Bottom 10 Rows :=
VAR RankedTable =
ADDCOLUMNS (
FILTER (
ALL ( 'Table'[Keyword] ),
NOT ISBLANK ( [Selected Metric] )
&& [Selected Metric] <> 0
),
"__Rank",
RANKX (
ALL ( 'Table'[Keyword] ),
[Selected Metric],
,
ASC,
SKIP
)
)
RETURN
IF ( MAXX ( RankedTable, [__Rank] ) <= 10, 1 )

View solution in original post

7 REPLIES 7
v-pgoloju
Community Support
Community Support

Hi @uj91,

 

Just following up to see if the Response provided by community members were helpful in addressing the issue. if the issue still persists Feel free to reach out if you need any further clarification or assistance.

 

Best regards,
Prasanna Kumar

 

v-pgoloju
Community Support
Community Support

Hi @uj91,

 

Thank you for reaching out to the Microsoft Fabric Forum Community, and special thanks to @Amar_Kumar and @johnbasha33  for prompt and helpful responses.

Just following up to see if the Response provided by community members were helpful in addressing the issue. if the issue still persists Feel free to reach out if you need any further clarification or assistance.

 

Best regards,
Prasanna Kumar

 

Amar_Kumar
Super User
Super User

Step 1. create a base dynamic value measure.

(This automatically respondes to field parameter)

Selected Metric := SELECTEDMEASURE()

 

Step 2 :- create bottom 10 filter measure 

Bottom 10 Keywords :=
VAR RankValue =
RANKX (
FILTER (
ALL ( 'Table'[Keyword] ),
NOT ISBLANK ( [Selected Metric] )
&& [Selected Metric] <> 0
),
[Selected Metric],
,
ASC,
DENSE
)
RETURN
IF ( RankValue <= 10, 1 )

Step 3: Apply this correctly (important)

  1. Add Keyword to the table

  2. Add Field Parameter value to the table

  3. Add Bottom 10 Keywords to Visual-level filters

  4. Set filter to is 1

I only need to show just bottom 10 entries even if their value is getting repeated is fine. For example - If impressions are having value 1 for the next 50 rows i only need to pick 10 rows which are last and dispaly in the table. (Keeping in mind i do not want to show 0 value) 

Update the final measure with the below 

Bottom 10 Rows :=
VAR RankedTable =
ADDCOLUMNS (
FILTER (
ALL ( 'Table'[Keyword] ),
NOT ISBLANK ( [Selected Metric] )
&& [Selected Metric] <> 0
),
"__Rank",
RANKX (
ALL ( 'Table'[Keyword] ),
[Selected Metric],
,
ASC,
SKIP
)
)
RETURN
IF ( MAXX ( RankedTable, [__Rank] ) <= 10, 1 )

johnbasha33
Super User
Super User

Hi @uj91 ,

Step 1 — Create a measure that returns the selected metric value

 

Your field parameter returns a column reference, so you must wrap it in a measure:

Selected Metric Value =

SWITCH(

    SELECTEDVALUE(SearchInsights[Search Insights Parameter]),

    0, SUM('Reporting.Search'[Total Impressions_Search]),

    1, SUM('Reporting.Search'[Total Clicks_Search]),

    2, SUM('Reporting.Search'[Total Media Cost_Search])

)

 

Step 2 — Create a measure that ignores 0 and 1 values

 

Metric >1 =

IF( [Selected Metric Value] > 1, [Selected Metric Value], BLANK() )

This way any keyword returning 0 or 1 becomes BLANK → disappears from the table and ranking logic.

 

Step 3 — Ranking measure for Bottom 10

 

Bottom Rank =

RANKX(

    ALL('Reporting.Search'[Keyword]),

    [Metric >1],

    ,

    ASC,     -- ASC = smallest first → bottom values

    Dense

)

 

Step 4 — Filter visual to show only Bottom 10

 

Create a Boolean measure:

Show Bottom 10 =

IF( [Bottom Rank] <= 10, 1, 0 )

 

Then apply this in the Visual Filter:

Show Bottom 10 = 1

 

Did I answer your question? Mark my post as a solution! Appreciate your Kudos !!



i need only bottom 10 keywords even if the values repeat. (Without 0 value) 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.