Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Slicer for columns

hello,    i have two numeric column field: VALUE & QUANTITY.   is it possible to combine them into 1 then will be used as slicer to switch them?          
  • Anonymous's avatar
    Anonymous
    4 years ago

    Hi Anonymous ,

     

    You may try the following formula to create a table:

    New table for slicer = 
    var _t1=CROSSJOIN(SELECTCOLUMNS({"Quantity"},"Name",[Value]),  SELECTCOLUMNS('Table',"Value",[Quantity]))
    var _t2=CROSSJOIN(SELECTCOLUMNS({"Value"},"Name",[Value]),SELECTCOLUMNS('Table',"Value",[Value]))
    return UNION(_t1,_t2)

     

    Best Regards,
    Eyelyn Qin
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.