Forum Discussion

KJanssens's avatar
KJanssens
Helper II
6 years ago
Solved

how to parameterize a calculated column

Dear,

How can I have the user select through some sort of parameter what kind of data he wants to see?

For example, I want to give the user the ability to switch ParameterX between the values "A" and "B".

My calculated column would be something like:

 

 

MyCalculatedColumn = SWITCH(Parameter,"A", "A is chosen", "B", "B is chosen", "")

 

 

I don't want to create two separate versions of  the calculated column (like "MyCalculatedOptionForValueA" and "MyCalculatedOptionForValueB") because the column is referred to in a lot of other calculated columns and would therefore end in a duplication of all related columns...

Thanks

  • Small update: We have been redesigning the data flow, so we generate all the different versions of the calculated field; with this we can use the "version indicator" as a slicer.

     

    to illustrate a bit, this was the situation that we tried:

    TableA with [ID], [ColumnA] and [MyCalculatedColumn] where

    [MyCalculatedColumn] = IF(ParameterA = true, [ColumnA] & " ParameterA is true", [ColumnA] " ParameterA is false")

     

    the new situation:

    Table A With [ID], [ColumnA]

    Table B With columns [TableA_ID], [ParameterA] and [MyCalculatedColumn]

6 Replies