In advance Power Bi scenarios , All of us have created dynamic slicers using measures.
the dynamic slicers works on factual values because we use Measures in there.
But what if we want the same slicer to represent Dimensions dynamically?
Well, here is the step by step solution for the same. Without using single DAX Function.
This scenario can be very helpful in migrating reports from other BI tool into Power BI
Transform Data :
Click on Transform data
Duplicate the table :
Right click on the table and duplicate the table.
Rename the table:
Rename the duplicated table to avoid the confusion.
Right click on column to Unpivot:
Right click on the column you want the data to be pivoted & click on unpivot Other Columns.
The column you are selecting can be your primary key or unique key. In my data I want the data to be distributed by date so I have selected date Column.
Select Unpivot Other Column :
After selection the Unpivot Other Columns, You will see 3 columns
- Pivoted Column
- Attribute
- Value
Close and apply changes :
Save your changes that you have made in the table.
Create a matrix chart :
Pick the pivoted column in Rows Field, Attribute in column Field & Value in values field
Create a Slicer and pull attributes field :
Create a slicer and pick the attribute column form new table into the slicer.
Select the values from slicer and columns will appear according to selection.
this is awesome ..Ketan,
thanks for sharing
Informative!
This is great!!! thanks for the trick.
Nice work, Can we apply filters in matrix columns, if yes then how?
Tried this but in the attribute column I have more than 100 records so matrix has limit upto only 100 columns . Can anyone suggest an alternative for this problem.
Unfortunately, table schemas (column names with data types and stuff) are stored in a hardcoded way in the data model of the report. So when new columns are added to some schema, the changes are not reflected until you download the report file and refresh it locally. So Power BI essentially makes any dynamic structure static, and at this point we can’t do anything about it.