Calculating MOM% with dates

Hi team,
i’m trying to calculate MOM% with date periods in mind. I am currently able to get results for fields that do not have any empty field using periodoverperiodpercentdifference however for field with an empty date section in the month it returns nothing even when i exclude Nulls. is there a better way to do this?

–*

Hello @Pru , welcome to the QuickSight community!

Do you want the calculation to return something when there is not date field value? For example, do you want QuickSight to return NULL or 0? Or do you want want the calculated field to skip rows with nulls and not show them in the visual?

Hello @Pru !

Are you still working on this issue or were you able to find a solution?

thanks for responding Duncan. I want the data to report 0 when the fields are null.

@Pru - Given your scenario, you can use ifelse() construct to conditionally render 0 or the periodoverperiodpercentdifference calculation based on whether your date field is null or not. Hope this helps!

Did my suggestion help you in resolving your query? If yes, would request you to mark the post as “Solution”. This will help the community to find guidance and answers to similar question. Thank you!

1 Like

Hello @Pru !

I think @sagmukhe 's suggestion should work for your use case