Forum Discussion

Wicak's avatar
Wicak
Icon for Helper I rankHelper I
4 years ago
Solved

call header coloumn name with coloumn value

i have a problem calling the names of sku coloumns into one coloumn, based on the value every day. have any suggestion? Thanks ðŸ˜Š

 

 

  • Thanks, 

     its works. but i didn't use SUM because the result was an error  

    SKU Run = 
    SWITCH(
        TRUE(),
        NOT(ISBLANK('Sample Table'[SKU A])),"SKU A",
        NOT(ISBLANK('Sample Table'[SKU B])),"SKU B",
        NOT(ISBLANK('Sample Table'[SKU C])),"SKU C",
        NOT(ISBLANK('Sample Table'[SKU D])),"SKU D",
        BLANK()
    )

     

4 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Wicak ,
    You can use a calculated measure like this

     

    SKU Run = 
    SWITCH(
        TRUE(),
        NOT(ISBLANK(SUM('Sample Table'[SKU A]))),"SKU A",
        NOT(ISBLANK(SUM('Sample Table'[SKU B]))),"SKU B",
        NOT(ISBLANK(SUM('Sample Table'[SKU C]))),"SKU C",
        NOT(ISBLANK(SUM('Sample Table'[SKU D]))),"SKU D",
        BLANK()
    )

     

    Then pull this measure into the table or matrix.

    The output looks like this

    Regards,

    Aditya

  • Thanks, 

     its works. but i didn't use SUM because the result was an error  

    SKU Run = 
    SWITCH(
        TRUE(),
        NOT(ISBLANK('Sample Table'[SKU A])),"SKU A",
        NOT(ISBLANK('Sample Table'[SKU B])),"SKU B",
        NOT(ISBLANK('Sample Table'[SKU C])),"SKU C",
        NOT(ISBLANK('Sample Table'[SKU D])),"SKU D",
        BLANK()
    )

     

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi Wicak, can you tell what error you are facing?

      • Wicak's avatar
        Wicak
        Icon for Helper I rankHelper I

        Sory,

        There seems to be a value model in a row that has its own value. so SUM can't work