Forum Discussion

caduwek's avatar
caduwek
Frequent Visitor
6 years ago

Switch based on the columns

Hello,

 

I have many calculated fields (100+) which I would like to add into the graph based on the sellection. Graph should show only one metric which I choose in the dropdown menu.

 

For this I created table where is name of these metrics (which I would like to select) and name of the calculated fields (calculation behind) :

 

Name metric                name calculated field

number of clients         cnt_client

amount of credit           amt_credit

...

...

...

 

Then I have there switch which chose calculated field based on the sellected name. 

Bu question:  Is possible to create switch like

 

switch(table[Name metric], selected table[Name metric], '[table[name calculated field]]' - take calculated field which has same as in the table) in one row instead write every possibility for each name metric one by one?

 

Thank you

 

 

2 Replies