Forum Discussion

As_analyst's avatar
As_analyst
Regular Visitor
4 months ago
Solved

Dynamic Brand Navigation Based on Country Selection (Hide Pages with No Data)

Hi Experts,

 

I’m working on a pharma report in Power BI and need help designing a dynamic navigation experience.


🔹 Data Model:

  • Fact table contains:
    • Brand Name
    • Country Code
    • Sales
  • The report has separate pages for each brand (Paracetamol, Aspirin, Crocin, Augmentin, and Dolo 650).
  • Each page contains multiple KPIs based on brand-specific logic.
  • A global country slicer is placed on top and affects all pages.

🔹 Requirement:

I want to dynamically show/hide brand navigation buttons based on data availability for the selected country.


🔹 Example 1:

  • User selects DE from the slicer.
  • Available brands:
    • Paracetamol
    • Crocin
    • Dolo 650
    • Augmentin
  • Not available:
    • Aspirin

👉 Expected behavior:

  • The aspirin navigation button should be hidden
  • The remaining 4 brand buttons should automatically shift up in the sequence
  • User should NOT be able to navigate to Aspirin page (since it has no data)

🔹 Example 2:

  • User selects IN
  • Available brands:
    • Paracetamol
    • Dolo 650
    • Augmentin
    • Aspirin
  • Not available:
    • Crocin

👉 Expected behavior:

  • The crocin navigation button should be hidden
  • Remaining buttons should auto-align (no gaps)
  • Only pages with data should be accessible

🔹 Problem:

  • Power BI buttons / page navigation are static
  • Even if I control visibility using measures, layout does NOT auto-adjust
  • Users can still land on blank pages if navigation is not controlled properly

🔹 Ask:

  1. Is there a way to
    • Dynamically hide navigation buttons
    • AND auto-adjust layout (move buttons up)?
  2. What would be the best design approach for this scenario?
    • Bookmarks?
    • Field parameters?
    • Conditional navigation?
    • Single page with dynamic content instead of multiple pages?

🔹 Goal:

Avoid showing or navigating to blank brand pages and provide a clean, dynamic UX. You can select anything like a slicer, filter, or any other design view to achieve a result.

link to pbix file is here for reference: https://www.dropbox.com/scl/fi/pjgn5qj87v4fbgbft8x1k/Dynamic-Nevigation-on-page-based-on-availlable-data-in-table.xlsx.pbix?rlkey=to2fhrdayzbu0igygo3l16piy&st=04qdjlih&dl=0

 

Thanks in advance for your suggestions! 🙏

  • Hi As_analyst  , there are many ways to achieve this. I can see you have created separate pages for all the brands. Do you have requirement of different KPIs / designs for each brand? Otherwise, a better approach would have been to use drill-through button option. Howeever considering you have different pages and you want to expose all the brand pages to all counries users, best option I think would be to create a landing page. Where user will select Country (single select), hence a brand (single select) and then have a button which will be enabled when a brand / product is selected. 

    Create a simple measure:

    selected_brand = SELECTEDVALUE(Pharma[BRAND_NAME]
    use this as button destination.

     

    and main page design something like below:

     

    Well, I understand, UI wise, this is not the beset design, however you can certainly play around with formatting, alignment to make it look better.

    Hope this helps to resolve your problem. If it does, then please mark it as solution.

    Thanks - Samrat

     

     

5 Replies

  • Hi As_analyst  , there are many ways to achieve this. I can see you have created separate pages for all the brands. Do you have requirement of different KPIs / designs for each brand? Otherwise, a better approach would have been to use drill-through button option. Howeever considering you have different pages and you want to expose all the brand pages to all counries users, best option I think would be to create a landing page. Where user will select Country (single select), hence a brand (single select) and then have a button which will be enabled when a brand / product is selected. 

    Create a simple measure:

    selected_brand = SELECTEDVALUE(Pharma[BRAND_NAME]
    use this as button destination.

     

    and main page design something like below:

     

    Well, I understand, UI wise, this is not the beset design, however you can certainly play around with formatting, alignment to make it look better.

    Hope this helps to resolve your problem. If it does, then please mark it as solution.

    Thanks - Samrat

     

     

  • Hi As_analyst 

    It is not currently possible to dynamically show or hide individual items within a navigation button. A workaround is to use separate buttons and control their destination using conditional formatting, as suggested by samratpbi , and also make them appear invisible by setting their transparency via conditional formatting. Note that the buttons still exist in the background—they are simply rendered as transparent.

     

  • v-abhinavmu's avatar
    v-abhinavmu
    Community Support

    Hi As_analyst,
    Thank you for posting your query in the Microsoft Fabric Community Forum, and thanks to samratpbi lbendlin danextian 
    for sharing valuable insights.

     

    Could you please confirm if your query has been resolved by the provided solutions? This would be helpful for other members who may encounter similar issues.

     

    Thank you for being part of the Microsoft Fabric Community.

  • v-abhinavmu's avatar
    v-abhinavmu
    Community Support

    Hi As_analyst,

    May I check if this issue has been resolved? If not, Please feel free to contact us if you have any further questions.

    Thank you for being part of the Microsoft Fabric Community.