Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a flag which should trigger only when DtPrejuizo < DtReferencia, but not for rows where DtPrejuizo is null:
If(Date(Date#([DtPrejuizo], 'YYYYMMDD')) < Date(Date#([DtReferencia], 'YYYYMMDD'))
and Len(Trim([DtPrejuizo]))>0 , 1, 0) as FlagPrejuizo,
I'm using FlagPrejuizo={'0'} in the "Current SALDO" measure; it is working as expected for the first four rows, since DtPrejuizo > DtReferencia.
However the result is zero for the last two rows, where DtPrejuizo is null, when I want it to be the same as "SOMA SALDO"
I also tried a nested if, with the same results.
Can you share the complete script?
Sorry about the confusion, the problem was that I had the 'DtPrejuizo' field in both tables; in one of the them the nulls were actually null, while the other one displayed them as "19000101".
Sorry about the confusion, the problem was that I had the 'DtPrejuizo' field in both tables; in one of the them the nulls were actually null, while the other one displayed them as "19000101"
Guess problem is with Date Interpretation function. Replicated your scenario, worked without any issues. !