Forum Discussion

showy123's avatar
showy123
Frequent Visitor
9 months ago
Solved

Build dynamic TopN Filter on page with fieldparameter

Hi everyone,

I am trying to build a dynamic TopN filter with field parameters. I cannot use field parameters in the filter bar under TopN filtering, so I would like to put it on the page and use it to dynamically move the TopN number.

 

I have a D_Article and an F_Sales.

With the field parameter, I can switch between F_Sales[Quantity] and F_Sales[Revenue]. Now I would also like to have the option of controlling the number of bars in the visual with a TopN filter on the page.

 

Does anyone have any ideas?

 

 

  • Hi showy123 

     

    There must be different ways to solve this, but here is my solution:

    1. Create a numeric parameter (TopN).

    2. Create two measures (TopN Filter Chart1 and TopN Filter Chart2) — one for each chart — that return 1 if the column falls into topN. Use these measures as visual-level filters to show only 1.

    I have attached a sample file with the measures I created for your reference.

     

     

     

     

     

     

6 Replies