Forum Discussion
admin11
Memorable Member
4 years agoHow to compute Stock Aging Amount by year ?
Hi All I have below syntax working fine :- _SLOW_1_YEAR = IF ( TODAY () - SELECTEDVALUE ( INVC[Last Sales] ) >1 * 365 && SELECTEDVALUE ( INVC[Last Sales] ) <> BLANK (), 1, 0 ) _SLO...
Greg_Deckler
Community Champion
4 years agoadmin11 You can use an Append query in Power Query Editor or you could use UNION in DAX.
admin11
Memorable Member
4 years agoThank you very much for your fast reply.
Actually what i need to combine the below 2 syntax into 1 :-
_SLOW_1_YEAR =
IF (
TODAY () - SELECTEDVALUE ( INVC[Last Sales] ) >1 * 365
&& SELECTEDVALUE ( INVC[Last Sales] ) <> BLANK (),
1,
0
)
_SLOW_2_YEAR =
IF (
TODAY () - SELECTEDVALUE ( INVC[Last Sales] ) >2 * 365
&& SELECTEDVALUE ( INVC[Last Sales] ) <> BLANK (),
1,
0
)
So i can know 1 year and 2 year slow moving amount.
Paul
- Greg_Deckler4 years ago
Community Champion
admin11 Just use a SWITCH(TRUE(), ) statement and put your IF true/false statements in as conditions, like:
_SLOW_YEAR = SWITCH(TRUE(), TODAY () - SELECTEDVALUE ( INVC[Last Sales] ) >1 * 365 && SELECTEDVALUE ( INVC[Last Sales] ) <> BLANK (),1, TODAY () - SELECTEDVALUE ( INVC[Last Sales] ) >2 * 365 && SELECTEDVALUE ( INVC[Last Sales] ) <> BLANK (),1, 0 )- admin114 years ago
Memorable Member
I have try , it does not work .
Below is the link my PBI file :-
https://www.dropbox.com/s/6ol6l2dfhro49sg/PBT_V2021_113.pbix?dl=0
Paul