Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Milan6687
Helper II
Helper II

Change column in table view based on slicer

Hi,

 

I have two tables one Level and other matrix.

Level

Comapny  Organization Business Team SubTeam

ABC            xyz                htd          team1   subteam1

.

.

Matrix

Total sales     Total Revenue

100                500000

.

.

 

I created Table view like below:

CompanyTotal SalesTotal Revenue
ABC100500000

 

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
htd5030000

 

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.

 

 

3 REPLIES 3
Anonymous
Not applicable

@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 .

amitchandak
Super User
Super User

kumar27
Advocate V
Advocate V

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

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors