Sitemap

Create a TabNames Table ,SelectedTab Measure and Add Power App in Power BI

2 min readOct 26, 2026

--

Press enter or click to view image in full size
Photo by Tim Stief on Unsplash

Step 1: Create the TabNames table

  1. Go to Home → Transform data.
  2. Choose New Source → Blank Query.
  3. Open Advanced Editor, replace everything with this code, and click Done:
let
Source = Table.FromList(
{
"Overview-MTD", "Overview-QTD", "Overview-YTD",
"Sales-MTD", "Sales-QTD", "Sales-YTD",
"Operations-MTD", "Operations-QTD", "Operations-YTD",
"Finance-MTD", "Finance-QTD", "Finance-YTD"
},
Splitter.SplitByNothing(),
{"PageName"}
),
ChangedType = Table.TransformColumnTypes(Source, {{"PageName", type text}})
in
ChangedType
  1. Rename the query to TabNames.
  2. Click Close & Apply.

Step 2: Create the SelectedTab measure

  1. Right-click TabNames in the Data pane and choose New measure.
  2. Paste:
SelectedTab = SELECTEDVALUE(TabNames[PageName], "Overview-MTD")

Note: Use "Overview-MTD" as the default so it matches the table values.

Get Shijo’s stories in your inbox

Join Medium for free to get updates from this writer.

Step 3: Test it

  1. Add a Slicer using TabNames[PageName] and turn on Single select from the format visual.
  2. Click the slicer on the report canvas to select it.
  3. In the Visualizations pane, click the middle icon (the paintbrush) to open Format visual.
  4. Make sure the Visual tab is selected. It’s next to General.
  5. Expand Slicer settings.
  6. Expand Options.
  7. Under Style, open the dropdown and choose Tile. The PageName values will show as clickable buttons.
  8. Expand Selection.
  9. Turn Single select On. This lets the user pick only one tab at a time.

TO see the data (Optional)

  1. Add a Card showing SelectedTab.
  2. Click different slicer values. The card should update to match.

Step 4: Add Power app

  • Select the slicer first (mandatory).
  • In Visualizations → Build visual, click Power Apps for Power BI.
  • When the Power Apps visual loads, click Choose app and select your Power App.

--

--

Shijo
Shijo

Written by Shijo

Software Engineer, photographer