vendredi 24 avril 2020

IF performance on DAX formula

i am stuck on simple performance problem. i have a RunningBalance formula. I have no problem with this formula. It gives me the last nonempty value of balance. (i have the balance on rows.)

Then i try to write another formula with using this formula. Aim is simple. New formula sould show me nothing(BLANK()) when it is <=0

i tried

RunningBalance:=CALCULATE (
    SUM ( DebitsAndCredits[balance]  );
    LASTNONBLANK (
        'Date'[Day];
        CALCULATE ( SUM (DebitsAndCredits[balance] ) )
    )
)

enter image description here

Newformula:=CALCULATE ( IF ( [RunningBalance] <= 0; BLANK (); [RunningBalance] ) )

i wrote this simple formula. But it is very slow when i use DocumentNumber on rows.

How can i make this formula faster?

Aucun commentaire:

Enregistrer un commentaire