Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago

Matrix with dynamic rows based on slicer

Hi everyone,

 

I have read a lot of post related to dynamic columns, dynamic rows but not exactly what I need to do. I'm new on this (Power BI and asking in communities) so I'll try to explain what I need.

I have a resultset with the following format:

 

 

Column descriptions:

LongName: is the name of the client

ValueDate: is the Date of the sales

TotalAmount: is the sales amount

Jurisdiction/SourceName/Volatility/etc: All the other columns are attributes of the client.

 

The expectation is to have all the other columns (Attributes) in a slicer, and the user can select as many as they want and put the value in a matrix and do the calculation.

For example if a user select Jurisdiction and SourceName the matrix should look like this:

The hierarchy is important for the client so if they select first SourceName and then Jurisdiction it should look like this:

 

After reading and testing a lot I have a version that works with 1 value (SourceName or Jurisdiction or else). The way I accomplished it was by referencing the dataset and unpivot by everything else. Here is my PowerBi

 

https://drive.google.com/open?id=1BUwI_O1DnH4NyuvBycaluPqsYS-0N9o6

 

But it's not exactly what I need and as I said it only works for 1 and I need it for multiple Attributes.

 

Any idea or help to accomplish this?