sqlsql-serverreporting-servicesssrs-2012powerbi-paginated-reports

how to write Derived columns as a group from a view in SQL


I have a view table called Item with column names as shown below:

enter image description here

I want to create parameters that groups the columns in Levels that will cascade parameter from top level to next level before reaching to the column name level. To illustrate this, see screenshot below: enter image description here

Level1 is the top level when any value is selected in it parameter then Level2 appears and another selection is made before reaching Column Name level.

How can I use my Item view to generate sql script to achieve my goal is Power BI paginated report? I have tried using CTE but didn't get it. Any help will be appreciated.


Solution

  • The only way to achieve this is to create a parameter for each column. You can then use the value selected in the parent parameter as parameter for the dataset of the second one.

    The @Level1 parameter will be a query parameter for the @Level2 and the @Level2 parameter will be a query parameter for the @ColumnName.

    The parameter list values will update automatically based on the user's selection.