cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Reply
erche3
Helper I
Helper I

create dynamic column or table responsing to filter /slicer

Hello,

I am a newbie in Power BI

I am wondering if I could create a dynamic new column or table responsing the filter

for example ,   if I filter by "customer level " ,  then in this new column / table  will take {customer name} , 

or If I filter by "item level" , this new column will take {item name} .

 

so I could choose wanted group level in the comparison chart from the filter ,

or if there any better way to do it ?

 

thanks

Erik

1 ACCEPTED SOLUTION
v-yuta-msft
Community Support
Community Support

Hi erche3,

 

Power BI doesn’t support dynamic calculate column, in addition, if my understanding is right, you have 2 tables, the first table has a column [level] which contains two different values “customer level” and “item level”, the second table has two columns [customer name] and [item name], right?

 

To achieve your requirement, you can take steps below as a reference:

  1. Click Query Editor -> Transform -> Unpivot columns [customer name] and [item name] to attribute-value in the second table.
  2. After applied, create a relationship between the two tables based on some columns.
  3. In Query Editor, merge the two table into a new table.

 

Now you can create a slicer on [level] to filter values.

 

Regards,

Jimmy Tao

View solution in original post

2 REPLIES 2
v-yuta-msft
Community Support
Community Support

Hi erche3,

 

Power BI doesn’t support dynamic calculate column, in addition, if my understanding is right, you have 2 tables, the first table has a column [level] which contains two different values “customer level” and “item level”, the second table has two columns [customer name] and [item name], right?

 

To achieve your requirement, you can take steps below as a reference:

  1. Click Query Editor -> Transform -> Unpivot columns [customer name] and [item name] to attribute-value in the second table.
  2. After applied, create a relationship between the two tables based on some columns.
  3. In Query Editor, merge the two table into a new table.

 

Now you can create a slicer on [level] to filter values.

 

Regards,

Jimmy Tao

Great!

 

this is a smart way to do it . thanks very much !

 

then I suppose first I need to dulipcate the second data table , and do this unpivot separately on another table,  in order to build this deviation chart , with custom filtering "customer level" or " item level"

 

because I have   another sales overview on monthly level ,  if I take from the same  table ("unpivoted [customer name] and [item name] ) ,  I will get a double volume on monthly .

 

right ?

Helpful resources

Announcements
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors