Forum Discussion
Cumulative Sales only by Selected Year
- 9 years ago
Hi all.
I think I found a solution regarding to my last reply. Talking to my wife today about it (and Yeah, she does not know anything about DAX) she helped me to figure out a way using a different approach of IF statement. Funny! At least it is working.
I know that you may have a lot of other ways to reach same outcome and I kindly ask you to share with us. Regardless this issue is a very basic one I think it is important to know about other ways and of course I am learning a lot with Power BI Community.
My New Calculated Field:
ACT. Y. BIL. BRL := IF ( OR ( CALCULATE ( [ACT. BIL. BRL]; FILTER ( 'date'; 'date'[Month Number] ) ) = 0; CALCULATE ( [ACT. BIL. BRL]; FILTER ( 'date'; 'date'[Month Number] ) ) = BLANK () ); BLANK (); CALCULATE ( [ACT. BIL. BRL]; FILTER ( ALL ( 'date' ); 'date'[Year] = MAX ( 'date'[Year] ) && 'date'[Date] <= MAX ( 'date'[Date] ) ) ) )Thanks again,
Hi all.
I think I found a solution regarding to my last reply. Talking to my wife today about it (and Yeah, she does not know anything about DAX) she helped me to figure out a way using a different approach of IF statement. Funny! At least it is working.
I know that you may have a lot of other ways to reach same outcome and I kindly ask you to share with us. Regardless this issue is a very basic one I think it is important to know about other ways and of course I am learning a lot with Power BI Community.
My New Calculated Field:
ACT. Y. BIL. BRL :=
IF (
OR (
CALCULATE ( [ACT. BIL. BRL]; FILTER ( 'date'; 'date'[Month Number] ) ) = 0;
CALCULATE ( [ACT. BIL. BRL]; FILTER ( 'date'; 'date'[Month Number] ) )
= BLANK ()
);
BLANK ();
CALCULATE (
[ACT. BIL. BRL];
FILTER (
ALL ( 'date' );
'date'[Year] = MAX ( 'date'[Year] )
&& 'date'[Date] <= MAX ( 'date'[Date] )
)
)
)Thanks again,
You are a life saver.
Kudos.