Question

Is there a way to change the column name dynamically based on filter setting?

  • 22 July 2022
  • 2 replies
  • 121 views

Hello here,

 

Just wondering if there is a way to change column names dynamically based on different filter settings. For example, below is the table calculation columns I create. For the “GRS vs LW”, it means the percent change between this month(7/2022) revenue and last month 6/2022 revenue (or depend on the month filter users decide to filter to). Is there a way to change the “GRS vs LW” to “GRS vs 6/2022”? and 6/2022 can dynamically change based on filter that users set? 

 

Thanks for the help!!


2 replies

@zttzhu -  Replace the month_column_filter to exact column in the below code 

label: "GRS vs {{_filters['month_column_filter ']}} "

 

Hi @vikram.singh-1632924966 . Thanks for the response! Do you mind giving an example about how to do that? Sorry still kind of new to looker so not sure what do you mean by “replace the month_column_filter to exact column in the below code”. And where should I use the code you paste here?

Thanks!

Reply