Can we create a column which calculates minimum of 2 same columns but with different filter?
Consider Column_1 is having a filter Filter_1 and Column_2 is having a filter Filter_2, here both the columns are same but filters are different. Also filters are coming from Presentation Variables.
Solved! Go to Solution.
It is possible using min function and bring those 2 presentation variable filter based columns into formula builder itself.
For eg. using case formula you can apply the presentation variable based filter in the condition and bring the column1 and
similarly using another case formula you can apply the presentation variable based filter in the condition and bring the column2.
By applying min function for these 2 columns created in formula builder, you can get the desired result.
Eg:$PeriodName is Presentation variable in 'MM-YY' format i.e. '12-22' for Dec 2022
Test.psr_base_cost.period_name = $PeriodName,
'20' + substring(
) + 1
) = Test.psr_base_cost.period_year,
Above scenario, column1 is showing data for chosen 'Period Name' and Column2 is showing data for the 'year' wise.
'Test' is the schema name and 'psr_base_cost' is table name in above scenario.