Forum Discussion
Switch category
Hello dear, thanks for your help, I progress well! I'm near from the solution. I have added the amount of sector 1,2 and 3 to the 1/3 of amount of sector 20%. Now I just need to show the VAR A_BNAC; B_BNAC and C_BNAC and the rest of the others sectors (normal amount). What would be the next step afetr RETURN?
sportive92003 here:
Secteur_BNAC =
VAR A = CALCULATE([Montant Measure], Fusionner1[Clients.Secteur] = "01 -Machinerie et travaux")
VAR B = CALCULATE([Montant Measure], Fusionner1[Clients.Secteur] = "02 -Marine et portuaire")
VAR C = CALCULATE([Montant Measure], Fusionner1[Clients.Secteur] = "03 -Hydroélectrique")
VAR Montant_BNAC = IF(Fusionner1[Secteur 20%] = 1, Fusionner1[montant] / 3, BLANK())
VAR A_BNAC = (A + Montant_BNAC)
VAR B_BNAC = (B + Montant_BNAC)
VAR C_BNAC = (C + Montant_BNAC)
RETURN
SWITCH(
TRUE,
Fusionner1[Clients.Secteur] = "01 -Machinerie et travaux", A_BNAC,
Fusionner1[Clients.Secteur] = "02 -Marine et portuaire", B_BNAC,
Fusionner1[Clients.Secteur] = "03 -Hydroélectrique", C_BNAC,
Fusionner1[Secteur 20%] = 1, Montant_BNAC,
Fusionner1[montant])
BBF
- sportive920032 years ago
Helper II
Hello,
I'm sorry, the result is same as usual.
Result sector 01 should be 9 931 050 (sector 01= 9 462 578 + 1/3 of sector 20% (468 471)
- sportive920032 years ago
Helper II
Hello again, it's ok when using de RETURN A_BNAC, but adding the switch it come back to the original version. Selecting sector 01, it should appears sector 01 and sector 20% (1/3) like that. In the programmation something is wrong with the switch. Do you have any other solution?