Can someone help me to make this as a calculated formula

Here is the condition

The SUM of Sale where Sale_Date is BETWEEN Joined_Date –30(days) AND Joined_Date -1

sum(ifelse(dateDiff({sales_date},{joined_date})<=-1 AND dateDiff({sales_date},{joined_date})>=-30,{sales},0))
1 Like

interesting code, let me try this actually it helps or even resolve this problem. It gives me hint to create a formula. By the way this is my code

truncDate(β€˜DD’,{Sale_Date}) >= addDateTime(-30,β€˜DD’,truncDate(β€˜DD’,{Joined_Date})) AND truncDate(β€˜DD’,{Sale_Date}) < addDateTime(-1,β€˜DD’,truncDate(β€˜DD’,{Joined_Date})))

Hi @danielreyes3rd

Hoping the above solution worked for you? I am marking the reply as β€œSolution,” but let us know if this is not resolved.

Thanks for posting your questions on the QuickSight CommunityQ&A Forum!