Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Objective:
Build a table whose content changes with the SELECTEDVALUE
Design:
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!
Solved! Go to Solution.
@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] )
)
)
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?
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. 🙂
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.
@CantonBI
Please copy/paste the formula of the calculated table so I can edit on top of it.
@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] )
)
)
thank you! I got it to work...
* I embedded the Measure in a new calculated table which is just a copy of the Lineage table
* I modified the Filter a little
InSelectedPath = COUNTROWS ( FILTER ( 'SelectedLineage', CONTAINSSTRING ( SELECTEDVALUE ( Lineage[_path] ), [PART_WORK_ORDER] ) ) )
Keys here are:
* The Filter function uses the new table
* The SelectedValue function points to the Lineage table
For whoever who will be reading this in the future...BE CAREFUL when yo u draw the relationship. After I got it working, I went to the modeling and link up the Lineage table and the SelectedLineage. The result got altered!
It seems like the measure is producing "1" for all rows
It will produce 1 only if the condition is true otherwise the result is blank.
I applied the measure in the Lineage table, but it seems like PBI is only evaluting the row picked out by the slicer.
User | Count |
---|---|
98 | |
91 | |
84 | |
73 | |
67 |
User | Count |
---|---|
115 | |
102 | |
98 | |
71 | |
66 |