Forum Discussion
RvanMelis
4 years agoFrequent Visitor
Using IF statement with measure
Hello, I'm facing issues when i try to make an IF statement in a measure, using measures. I did some research myself but can't find the proper solution for my problem. I created a table w...
- 4 years ago
Hi RvanMelis
try
OHW op aanneemsom = IF ( NOT ISBLANK ( [Mijlpalen gefactureerd] ) && NOT ISBLANK ( [Aanneemsom] ) && NOT ISBLANK ( [Totaal realisatie] ), IF ( [Mijlpalen gefactureerd] >= [Aanneemsom], 0, IF ( [Totaal realisatie] < [Aanneemsom], [Totaal realisatie] - [Mijlpalen gefactureerd], IF ( [Totaal realisatie] >= [Aanneemsom], [Aanneemsom] - [Mijlpalen gefactureerd], 0 ) ) ) )
RvanMelis
4 years agoFrequent Visitor
Hi Tamerj, this works perfectly! Thank you very much.
Can you please explain to me what i did wrong or why your measure works? I'm trying to understand so i can take this into next things.
tamerj1
4 years agoCommunity Champion
The first if statement: if the two measures are blank they are equal and the if statement forces 0 therefore all the previously hidden rows will appear to disply the value 0
the new code checks first if they are not blank then continues with other conditions otherwise returns blank