Showing results for 
Search instead for 
Did you mean: 
Helper I
Helper I

Change column in table view based on slicer



I have two tables one Level and other matrix.


Comapny  Organization Business Team SubTeam

ABC            xyz                htd          team1   subteam1




Total sales     Total Revenue

100                500000




I created Table view like below:

CompanyTotal SalesTotal Revenue


I have slicer(Comapny  Organization Business Team SubTeam)--created using insert data.

Now based on above slicer slection first cloumn should change. Suppose user slect Business from slicer table should be:

BusinessTotal SalesTotal Revenue


Unpivot option is not avaliable as Level table is created using DAX.

I tried to create measure :SWITCH(SELECTEDVALUE(SELECTEDSLICER,"Company",Distinct(Level[Company]),

"Organization",Distinct(Level[Organizton]), and so on. But some levels have more than one distinct values so its throwing error.


Is there any other way we can achive this.


Thanks in advance.



Resolver II
Resolver II

@Milan6687  Hey Milan,
you have to create a refernce table from original table then 
you can create a table in power query mode as well .then you can unpiovt it 

thank you 

try this and let me know .

Super User IV
Super User IV

@Milan6687 , Are you trying to change axis/ group by /row of visual . Then bookmark is on option


other are Dynamically change chart axis in Power BI

Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

Advocate II
Advocate II

so, at the model side are the two tables connected? 

If they are connected properly, then a metric like - SUM(sales) only will be required and woud filter by the dimemsions.

Helpful resources


Happy New Year from Power BI

This is a must watch for a message from Power BI!

December Update

Check it Out!

Click here to read more about the December 2020 Updates!

Community Blog

Check it Out!

Click here to read the latest blog and learn more about contributing to the Power BI blog!

Get Ready for Power BI Dev Camp

Get Ready for Power BI Dev Camp

Mark your calendars and join us for our next Power BI Dev Camp!.