Forum Discussion
Dynamic column for visual
- Anonymous2 years ago
Hi HenSza ,
Here are the steps you can follow:
1. In Power Query -- Select [Level 1 Manager], [Level 2 Manager], [Level 3 Manager], [Level 4 Manager] – Transform – Unpivot Columns.
2. Add Column – Index Column – From 1.
3. Create calculated column.
Rank = RANKX( FILTER(ALL('Table'),'Table'[User id]=EARLIER('Table'[User id])),[Index],,ASC)4. Create calculated table.
Use the columns of the new table as slicers
Table 2 = DISTINCT('Table'[Attribute])5. Create measure.
Flag = var _select=SELECTEDVALUE('Table 2'[Attribute]) var _level = MAXX(FILTER(ALL('Table'),'Table'[Attribute]=_select),[Rank]) return IF( MAX('Table'[Rank])>_level,1,0)6. Place [Flag]in Filters, set is=1, apply filter.
7. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
I need your help today. I've a table with three Columns:
tablename: T,
Columns: F1, F2, F3
On a slicer F1 is selecting Values
I want to draw a clustered bar graph such that the Y Axis of the bar chart is governed by the selection.I'm trying to add a dynamic column in the same table:
DynamicAxis = IF(SELECTEDVALUE('T'[F1]) = "X",'T'[F2],'T'[F3])
This one is not working when X is selected... Any guidance would be super helpful.