Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago

Make column headers in a Power BI Matrix visual dynamic based on slicers

Hello everyone,

I've set up a Matrix visual displaying sales data based on geographical locations: Europe, Asia, and Africa. The Matrix includes three measures: Sales 1, Sales 2, and Delta.

Sales 1 corresponds to selections made in the Loc1 slicer, Sales 2 to the Loc2 slicer, and Delta represents the difference between Sales 1 and Sales 2.

I'm looking to make the Matrix columns dynamically adjust based on the selections made in the Loc1 and Loc2 slicers.

Thanks

4 Replies

  • Anonymous Field parameter can help in this matter. Two field parameters, one for the locations and other for measures. Apply these parameters to slicers[independent] and to matrix visuals(rows or columns) as per need.

    • Anonymous's avatar
      Anonymous
      Not applicable

      Ill test this , thanks a lot 🙂 

    • Anonymous's avatar
      Anonymous
      Not applicable

      Unfrtunality , its not working , values are not changine :

      Parameter = {
          (FORMAT(SELECTEDVALUE(Sales_Loc1[Loc1], "No selection"), "mmmm"), NAMEOF('Sales_Loc1'[_Sales_loc1]), 0),
          (SELECTEDVALUE(Sales_Loc2[Loc2], "No selection"), NAMEOF('Sales_Loc2'[_Sales_loc2]), 1),
          ("[" & [_Loc2_selected_value] & " - " & [_Loc1_selected_value] & "]", NAMEOF('Sales_Loc2'[_delta]), 2)
      }

      Where if I replace the first column in Parmater with dates fucntions , they will work:
      https://www.youtube.com/watch?v=9_2m5Csr55c&t=186s

      Any Sugesstions 🙂 

  • Anonymous There is no way to get a slicer that affects one column but not the other. What can be done is get both the locations and both the measures giving 4 columns[Loc1 Sales1, Loc1 Sales2, Loc2 Sales1, Loc2 Sales2] and use them as per need.