Filtering a Speckle Visual in Power BI by WBS and Code

Good morning everyone,
I’d like to ask for your kind support for this topic. I hope to be as clear and concise as possible.

Context

I’m building a Power BI dashboard connected to IFC models via Speckle. I have three main tables:

  1. tBase → column Code WBS (e.g., PO01, GA02)
  2. tWorks → column Codes (e.g., E01, E02,W01,C01…), each code belongs to a WBS
  3. Query1 → IFC data from Speckle, columns: P_WBS (PO01, GA02), P_Code (E01, E02,W01,C01), plus other parameters. Some P_Code values are “N/A” or blank.

Objective

  1. Selecting a WBS → display the entire model for that WBS.
  2. Selecting a Code → the Speckle visual filters only elements matching that code.
  3. If a WBS has no P_Code → the visual still shows the whole model without errors.

Attempts Made

  1. Tried creating relationships between tables:
  • tBase[Code WBS] → tWorks[Code WBS]
  • tBase[Code WBS] → Query1[P_WBS]
  • tWorks[Codes] → Query1[P_Code]
    Problem: either the WBS filter stopped working or circular dependencies occurred.
  1. Tried DAX measures with VAR and IF, using SELECTEDVALUE to filter Query1 by WBS and Code.
  • Worked for a single code selection.
  • Failed with “N/A” values or WBS without codes.
  • Syntax errors with semicolons/commas and aggregation errors (Cannot determine a single value for column ...).
  1. Tried dynamic filtered table with SELECTEDVALUE → did not work for multi-selection or WBS without codes.

Goals / Questions for the Forum

  • How to create a dynamic filter that:
    1. Filters first by WBS.
    2. Then filters by Code (supporting multi-selection).
    3. Handles missing or “N/A” values in P_Code.
    4. Works with a Speckle visual that does not evaluate measures in visual filters.
  • Interested in alternative strategies: advanced measures, dynamically filtered tables, or passing parameters to the custom visual.

Hey @Alpha,

Do you have any minimum reproducable file to share?

Your steps and process looks correct. I will suggest to only use slicers in this case, they can support multi-selection filtering.

Maybe you can try to:

tBase[Code WBS] → Query1[P_WBS] (Bi-directional)
tWorks[Codes] → Query1[P_Code] (Bi-directional)

like this you avoid the circular relationship pattern

For the N/A elements you can replace them with a value that indicates that nothing is there, or set-up a logic that ingores these - this is a bit tricky.

This topic was automatically closed after 180 days. New replies are no longer allowed.