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

Data Days is here! Join us now for 60+ days of learning, challenges, and connection. Learn more

Reply
SKerody
Regular Visitor

Dynamic TreeMap

Dear Members,

 

I’m writing for the first time and I’m very new to Power BI.  I’m looking for a solution for dynamically adjusting tree-map based on the value selected.

Right now I’m showing top 20 location using Top N filer option instead I want this to be dynamic say I want to see top 25 or 30 sites or say any number. how do I do it.

Basically I want to parameterize the select of top sites by any specified number (top 5 / 10 / 15 / 20 sites).

 

SKerody_0-1654537014481.png

 

 

 

 

 

 

Please help….

 

Regards,

Sunil Kerody

1 ACCEPTED SOLUTION
v-yalanwu-msft
Community Support
Community Support

Hi, @SKerody ;

Try it.

1.create a what-if parameter as a topn slicer.

vyalanwumsft_0-1654741135139.png

2.create a top measure.

TOP = 
var _rank= RANKX(ALLSELECTED(financials),CALCULATE(SUM(financials[ Sales]),ALLEXCEPT(financials,financials[Country])),,DESC,Dense)
return IF(_rank<=[Parameter Value],1,0)

3.apply it into Treemap filter.

vyalanwumsft_1-1654741201168.png

The final output is shown below:

vyalanwumsft_2-1654741226202.png

vyalanwumsft_3-1654741236333.png


Best Regards,
Community Support Team _ Yalan Wu
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

1 REPLY 1
v-yalanwu-msft
Community Support
Community Support

Hi, @SKerody ;

Try it.

1.create a what-if parameter as a topn slicer.

vyalanwumsft_0-1654741135139.png

2.create a top measure.

TOP = 
var _rank= RANKX(ALLSELECTED(financials),CALCULATE(SUM(financials[ Sales]),ALLEXCEPT(financials,financials[Country])),,DESC,Dense)
return IF(_rank<=[Parameter Value],1,0)

3.apply it into Treemap filter.

vyalanwumsft_1-1654741201168.png

The final output is shown below:

vyalanwumsft_2-1654741226202.png

vyalanwumsft_3-1654741236333.png


Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Fabric Data Days is here Carousel

Fabric Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

May Power BI Update Carousel

Power BI Monthly Update - May 2026

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

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.