Minimiser l’utilisation du IF
If( Region=‘North America’, 100,
if( Region=‘Asia’,50,
if( Region=‘Europe’,75)
)
)
Solution #1 : Utilisation de la fonction pick(match()) dans la partie graphique
=pick( match( Region,'North America','Asia','Europe'),100,50,75)
Solution #2 : Utilisation du mapping dans la partie script
RegionMap:
Mapping Load * inline [
Region,Number
North America,100
Asia,50
Europe,75];
Regions:
Load
Region,
applymap(‘RegionMap’,Region) as Number;
From <>;




![[PowerBI][DAX] – Comment compter le nombre de ligne d’une table ?](https://i2.wp.com/mybicoach.bwabwanet.fr/wp-content/uploads/2020/01/powerbi-dax-countrows-logo-1.png?resize=100%2C70)