Forum Discussion

CantonBI's avatar
CantonBI
Frequent Visitor
4 years ago
Solved

SELECTEDVALUE not accessible in "Data mode"?

Objective:

     Build a table whose content changes with the SELECTEDVALUE

 

Design:

  1. Selectable - a single column table with a list of selectable part_work_order
  2. Lineage - multiple columns table containing part_work_order, parent_work_order and the path (from the PATH function)

Problem:

     From the visual, I can see the correct path via SELECTEDVALUE(Lineage[path]).  However, when I try to build a table to list the content, the SELECTEDVALUE does not provided any value.

 

 

As troubleshooting, I replaced the SELECTEDVALUE() call with hardcoded string and it works.  What am I missing?  Thank you!

 

  • tamerj1's avatar
    tamerj1
    4 years ago

    CantonBI 
    Click on the table visual that you want to filter and in the filter pane place this measure

    Filter Measure =
    COUNTROWS (
        FILTER (
            Lineage,
            CONTAINSSTRING ( SELECTEDVALUE ( Lineage[_path] ), Lineage[PART_WORK_ORDER] )
        )
    )

12 Replies

  • bcdobbs's avatar
    bcdobbs
    Icon for Community Champion rankCommunity Champion

    Hi, is that a calculated table you're trying to build? If so they're calculated at refresh time and never dynamically interact with the filter context.

     

    You'd need to use a table variable in a measure and then calculate on top of it.

     

    What visual output are you after?

    • CantonBI's avatar
      CantonBI
      Frequent Visitor

      it is a calculatedtable, but I don't have to use it...I was trying different options...since I couldn't get it to work.  I guess...the key challenge is here how to select a list of part_work_order that exist in the PATH.  🙂

      • tamerj1's avatar
        tamerj1
        Icon for Community Champion rankCommunity Champion

        Hi CantonBI 
        You can wrap the same table formula with COUNTROWS and create it as measure. Place this measure in the filter pane of your visual and select "Is not blank" then apply the filter. This way it will work dynamically with your selection.