Forum Discussion
bideveloper555
Helper IV
5 years agoYOY on card
hi i want to exlcude records from YOY measure if there is no value for current year/month based on user slicer selection. I did write a measure,which was working as it supposed to but requiremen...
- 5 years ago
Hi bideveloper555 ,
Create the following measures:
Previous year = SUMX ( VALUES ( 'Table'[Id] ), IF ( ISBLANK ( SUM ( 'Table'[ Current YEAr ] ) ), BLANK (), CALCULATE ( SUM ( 'Table'[ Current YEAr ] ), SAMEPERIODLASTYEAR ( 'Date'[Date] ) ) ) ) YOY % = DIVIDE([Previous year] - SUM('Table'[ Current YEAr ]) ,[Previous year])Now you can use on a table or a card:
Believe that on your image some calculationa are not exactly at line level, but the syntax should be similar to the ones above.
MFelix
Super User
5 years agoHi bideveloper555 ,
Create the following measures:
Previous year =
SUMX (
VALUES ( 'Table'[Id] ),
IF (
ISBLANK ( SUM ( 'Table'[ Current YEAr ] ) ),
BLANK (),
CALCULATE (
SUM ( 'Table'[ Current YEAr ] ),
SAMEPERIODLASTYEAR ( 'Date'[Date] )
)
)
)
YOY % = DIVIDE([Previous year] - SUM('Table'[ Current YEAr ]) ,[Previous year])
Now you can use on a table or a card:
Believe that on your image some calculationa are not exactly at line level, but the syntax should be similar to the ones above.
bideveloper555
Helper IV
5 years agoThank you MFlelix for the help.
i been struggling for quite some days.
Have a wonderful day.
Thank you Harsh.