Forum Discussion

nononiwniw's avatar
nononiwniw
New Member
8 years ago
Solved

Helllllllllllllllllllp! SCRIPT

Hello community,

I need your help about a script of custom column, so i want to have a value in column "Exportations MDH" when i had "EXPORTATIONS FAB" else to have "-" in column of "Importations MDH".

Plzzzzzzzzz help me  

  • Hi nononiwniw,

     

    Based on your description, [Exportations MDH] and [Importations MDH] are both calculate columns, right? You can use DAX formula like this:

    [Exportations MDH] =
    IF ( table[Flux_G_Agrefe_LIB] = "EXPORTATIONS FAB", "Value1", "Value2" )
    
    [Importations MDH] =
    IF (
        table[Flux_G_Agrefe_LIB] = "EXPORTATIONS FAB",
        FACT_ComExt[valeur_Stat_MDH],
        "-"
    )

    Regards,

    Jimmy Tao

     

     

2 Replies

  • Drors's avatar
    Drors
    Resolver III

    Please elaborate what excatly do you want to see in both coloumns if EXPORTATIONS FAB and what do you want to see if not

  • v-yuta-msft's avatar
    v-yuta-msft
    Community Support

    Hi nononiwniw,

     

    Based on your description, [Exportations MDH] and [Importations MDH] are both calculate columns, right? You can use DAX formula like this:

    [Exportations MDH] =
    IF ( table[Flux_G_Agrefe_LIB] = "EXPORTATIONS FAB", "Value1", "Value2" )
    
    [Importations MDH] =
    IF (
        table[Flux_G_Agrefe_LIB] = "EXPORTATIONS FAB",
        FACT_ComExt[valeur_Stat_MDH],
        "-"
    )

    Regards,

    Jimmy Tao