Forum Discussion

Prabavathy_0108's avatar
Prabavathy_0108
Frequent Visitor
1 year ago
Solved

Filter All Pages from Landing Page Only If Selected

Hi all, I have a Power BI report with 7 pages and a Landing Page where users can select either: Manufacturing Marketing BU   If the user selects Manufacturing in landing page, all ot...
  • Elena_Kalina's avatar
    1 year ago

    Hi Prabavathy_0108 

    Here's a comprehensive solution to filter all report pages based on a selection made on the landing page, with the behavior you described:

    Best Practice Solution

    1. Create a Parameter Table

    First, create a disconnected parameter table for your selection:

    Filter_Selection = 
    DATATABLE(
        "Option", STRING,
        {
            {"Manufacturing"},
            {"Marketing BU"},
            {"(No Filter)"}
        }
    )

    2. Add Selection Control

    On your landing page:

    • Add a slicer visual

    • Bind it to the Filter_Selection[Option] field

    • Set default selection to "(No Filter)"

    3. Create Filter Measures

    Create these measures to use as filters:

    Manufacturing Filter = 
    IF(
        SELECTEDVALUE(Filter_Selection[Option]) = "Manufacturing",
        "Manufacturing",
        UNICHAR(0)
    )
    
    Marketing Filter = 
    IF(
        SELECTEDVALUE(Filter_Selection[Option]) = "Marketing BU",
        "Marketing",
        UNICHAR(0)
    )

    4. Implement Page Navigation

    Add buttons with these actions:

    • Manufacturing Button:

      • Action: Bookmark

      • Data: Change Filter_Selection slicer to "Manufacturing"

      • Navigation: Go to target page

    • Marketing BU Button:

      • Action: Bookmark

      • Data: Change Filter_Selection slicer to "Marketing BU"

      • Navigation: Go to target page

    5. Set Up Page-Level Filters

    On each content page (not landing page):

    1. Add two filters in Edit Interactions mode:

      • Visual-level filter on Flag field:

        Flag = [Manufacturing Filter] || ISFILTERED(Flag) = FALSE
      • Visual-level filter on GLFlag field:

        GLFlag = [Marketing Filter] || ISFILTERED(GLFlag) = FALSE
    2. Set the filter logic to:

      • Only apply when the parameter is selected

      • Show all data when no selection is made

    6. Bookmark Configuration

    Create bookmarks for each scenario:

    • "Manufacturing View" - Sets selection and applies filters

    • "Marketing View" - Sets selection and applies filters

    • "Clear Filters" - Resets to "(No Filter)"

    Alternative Approach Using Buttons & Bookmarks

    If you prefer button-based navigation:

    1. Create three buttons on landing page:

      • Manufacturing

      • Marketing BU

      • View All (no filter)

    2. For each button:

      • Set action to "Bookmark"

      • Configure bookmark to:

        • Set slicer selection

        • Apply relevant filters

        • Navigate to target page

     

    If this post helps, then please consider Accepting as solution to help the other members find it more quickly, don't forget to give a "Kudos" – I’d truly appreciate it!  Thank you.

     

  • v-dineshya's avatar
    1 year ago

    Hi Prabavathy_0108 ,

    Thank you for reaching out to the Microsoft Community Forum.

     

    Please follow below steps.

    1. Create a Disconnected Table:

    SelectionTable = DATATABLE(
    "Selection", STRING,
    {
    {"Manufacturing"},
    {"Marketing BU"}
    }
    )

    2. Create a “Selection Bridge” Table:

    This acts as a persistent memory. Use a simple one-row table with a measure to populate it based on the user's interaction.

    3. Create a Measure to Act as a Flag

    This measure will filtering in the data model based on what the user selects only when they click a button.

    SelectedMode =
    VAR sel = SELECTEDVALUE(SelectionTable[Selection])
    RETURN
    SWITCH(TRUE(),
    sel = "Manufacturing", "Manufacturing",
    sel = "Marketing BU", "Marketing",
    BLANK()
    )

    4. Create a Page Filter Measure (used in visual/page filters):

    ApplyPageFilter =
    VAR flag = [SelectedMode]
    RETURN
    SWITCH(TRUE(),
    flag = "Manufacturing" && MAX('YourData'[Flag]) = "Manufacturing", 1,
    flag = "Marketing" && MAX('YourData'[GLFlag]) = "Marketing", 1,
    ISBLANK(flag), 1, -- Don't filter unless flag set
    0
    )

    Note: Apply this measure as a visual/page filter where ApplyPageFilter = 1.

    5. Landing Page Buttons: Use Bookmarks and SET the Selection

    Use a “Selection” slicer hidden under the button and set its value via a bookmark.

    Create 2 bookmarks:

    a. Manufacturing Bookmark:

    Select "Manufacturing" in slicer. Update bookmark (data + page + visuals). Set action on Manufacturing button to "Apply bookmark". Navigate to Manufacturing Page.

    b. Marketing BU Bookmark:

    Please follow the Same steps as above bookmark, selecting "Marketing BU". Navigate to Marketing Page.

    Note: This ensures filter gets set only when user clicks a button, and the page transition happens in one click.

    6. Other Pages:

    Add ApplyPageFilter = 1 to Filter Pane. Each page that should be filtered only when a user clicked a button should include:
    ApplyPageFilter in visual-level filters or page filters, set to = 1.

    Note: This allows, Proper filtering only after selection. No filtering at all if user navigates manually.

     

    If my response has resolved your query, please mark it as the "Accepted Solution" to assist others. Additionally, a "Kudos" would be appreciated if you found my response helpful.

    Thank you