Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
1 year ago
Solved

SWITCH with no values

Hi everyone, 

 

i would like to know how i can fix this formula please ? 

 

If in the table Agglo Commerciale'[Nom Strate Commerciale], I find "Monoprix" or "Carrefour so "RETAIL", If is blank "Créations digitales" else Agglo Commerciale'[Nom Strate Commerciale].

 

The formula I tried :

 

Mesure 2 = SWITCH(SELECTEDVALUE('Agglo Commerciale'[Nom Strate Commerciale],
"MONOPRIX", "RETAIL",
"CARREFOUR", "RETAIL",
ISBLANK(SELECTEDVALUE(Face[Produit]), "Créations digitales",
SELECTEDVALUE('Agglo Commerciale'[Nom Strate Commerciale]))))
 
Thank you so much !
 
Have a good day
  • Hi Anonymous ,

    Thank you for reaching out to Microsoft Fabric Community.

    Thank you Greg_Deckler for the prompt response.

     

    I have created corrected DAX measure using sample data to replicate the requirement.Please go through the attached PBIX file for your reference.

    Thank you.

3 Replies