Je migre un rapport Spotfire vers un rapport PowerBI. Pour l'une des colonnes, j'ai une requête Spotfire case when que je souhaite convertir en une expression DAX switch case. J'ai commencé et je pense que la première partie de la requête est correcte, mais je ne suis pas sûr de comment construire le reste de la requête. Voici les détails :<\/P>
Requête Spotfire case when :<\/P>
CASE WHEN (<\/STRONG><\/P> [RefPointGroupCap] n'est pas null) OU (<\/STRONG><\/P> [MortgageGroupCap] n'est pas null) OU (<\/STRONG><\/P> [MPBGroupCap] n'est pas null) OU (<\/STRONG><\/P> [NCBGroupCap] n'est pas null) OU (<\/STRONG><\/P> [SRCGroupCap] n'est pas null) ALORS<\/STRONG><\/P> <\/SPAN>"Y"<\/STRONG><\/P> <\/SPAN>& (if([RefPointGroupCap] est null,""," \/ " & [RefPointGroupCap]))<\/STRONG><\/P> <\/SPAN>& (If([MortgageGroupCap] est null,""," \/ " & [MortgageGroupCap]))<\/STRONG><\/P> <\/SPAN>& (If([MPBGroupCap] est null,""," \/ " & [MPBGroupCap]))<\/STRONG><\/P> <\/SPAN>& (If([NCBGroupCap] est null,""," \/ " & [NCBGroupCap]))<\/STRONG><\/P> <\/SPAN>& (If([SRCGroupCap] est null,""," \/ " & [SRCGroupCap]))<\/STRONG><\/P>WHEN (<\/STRONG><\/P> [RefPointGroupCap] est null) et (<\/STRONG><\/P> [MortgageGroupCap] est null) et (<\/STRONG><\/P> [MPBGroupCap] est null) et (<\/STRONG><\/P> [NCBGroupCap] est null) et (<\/STRONG><\/P> [SRCGroupCap] est null) ALORS "N"<\/STRONG><\/P>END<\/STRONG><\/P>La requête switch case que j'ai construite à mi-chemin :<\/P>Colonne=<\/STRONG><\/P>SWITCH (<\/STRONG><\/P>TRUE (),<\/STRONG><\/P>NOT(ISBLANK('F22_New_Cumulative_export (2)'[RefPointGroupCap])) ||<\/STRONG><\/P>NOT(ISBLANK('F22_New_Cumulative_export (2)'[MortgageGroupCap])) ||<\/STRONG><\/P>NOT(ISBLANK('F22_New_Cumulative_export (2)'[MPBGroupCap])) ||<\/STRONG><\/P>NOT(ISBLANK('F22_New_Cumulative_export (2)'[NCBGroupCap])) ||<\/STRONG><\/P>NOT(ISBLANK('F22_New_Cumulative_export (2)'[SRCGroupCap])) ,<\/STRONG><\/P>"Y" &&<\/STRONG><\/P>(IF(ISBLANK('F22_New_Cumulative_export (2)'[RefPointGroupCap]), BLANK(), " \/ " & 'F22_New_Cumulative_export (2)'[RefPointGroupCap]) &&<\/STRONG><\/P>(IF(ISBLANK('F22_New_Cumulative_export (2)'[MortgageGroupCap]), BLANK(), " \/ " & 'F22_New_Cumulative_export (2)'[MortgageGroupCap]) &&
(IF(ISBLANK('F22_New_Cumulative_export (2)'[MPBGroupCap]), BLANK(), " \/ " & 'F22_New_Cumulative_export (2)'[MPBGroupCap]) &&
(IF(ISBLANK('F22_New_Cumulative_export (2)'[NCBGroupCap]), BLANK(), " \/ " & 'F22_New_Cumulative_export (2)'[NCBGroupCap]) &&
(IF(ISBLANK('F22_New_Cumulative_export (2)'[SRCGroupCap]), BLANK(), " \/ " & 'F22_New_Cumulative_export (2)'[SRCGroupCap]),
ISBLANK('F22_New_Cumulative_export (2)'[RefPointGroupCap]) ||
ISBLANK('F22_New_Cumulative_export (2)'[MortgageGroupCap]) ||
ISBLANK('F22_New_Cumulative_export (2)'[MPBGroupCap]) ||
ISBLANK('F22_New_Cumulative_export (2)'[NCBGroupCap]) ||
ISBLANK('F22_New_Cumulative_export (2)'[SRCGroupCap]),
"N"
))))))
Faites-moi savoir si vous avez besoin de plus d'informations, merci pour l'aide !<\/p>