Forum Discussion

santiagomur's avatar
santiagomur
Icon for Resolver II rankResolver II
6 years ago
Solved

CREATE A TABLE DEPENDING ON A IF

HI,    i have multiple user and depends on the role i want to show some columns or others (a dynamic table depend on a if )   example    table 1 column a, column b, column c, clumn d, column e...
  • v-diye-msft's avatar
    6 years ago

    Hi santiagomur 

     

    Please kindly check whether you'd like to get below results:

    1.  I created a Table with column A&B&C&D&E, and another table with only one column as slicer:

    2. Then use below measures to generate the output

    field1 = SWITCH([Selected],"1",Max('Table'[B]),"2",Max('Table'[D]))
    field2 = SWITCH([Selected],"1",Max('Table'[C]),"2",Max('Table'[E]))