Forum Discussion
Create Filter from Columntitle
- Anonymous3 years ago
Hi acg ,
According to your statement, I think you want to show lines dynamicly by filter. One workaround is to UNPIVOT the columns that you need to make the column headers into one column and add it into Legend.
Or you can create a DimColumn header table and create a measure to achieve your goal.
Dim Column Header = { ("Full Time", 0), ("Non-Resident", 1), ("Other", 2), ("Part-Time", 3), ("Resident",4), ("Saisonal", 5) }Measure:
BS_Details_Last13Months = VAR _1 = CALCULATE ( SUM ( 'Table'[Resident] ) ) VAR _2 = SUM ( 'Table'[Non-Resident] ) VAR _3 = SUM ( 'Table'[Saisonal] ) VAR _4 = SUM ( 'Table'[Full Time] ) VAR _5 = SUM ( 'Table'[Part-Time] ) VAR _6 = SUM ( 'Table'[Other] ) VAR _PARAMETER = VALUES ( 'Dim Column Header'[Value1] ) RETURN SWITCH ( TRUE (), "Resident" IN _PARAMETER, _1, "Non-Resident" IN _PARAMETER, _2, "Saisonal" IN _PARAMETER, _3, "Full Time" IN _PARAMETER, _4, "Part-Time" IN _PARAMETER, _5, "Other" IN _PARAMETER, _6 )Result is as below.
Best Regards,
Rico ZhouIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi acg ,
In this case the best solution is to unpivot your columns or use field parameters on the query editor if you select the Entity and do a unpivot others you should get a result similar to this:
Now you can use the attribute column has a slicer or has a column heard on your table visualziation: