Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
nononiwniw
New Member

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".

2018-04-23.png

Plzzzzzzzzz help me  

1 ACCEPTED SOLUTION
v-yuta-msft
Community Support
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

 

 

View solution in original post

2 REPLIES 2
v-yuta-msft
Community Support
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

 

 

Drors
Resolver III
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

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.