I am trying to replicate this tableau formula in quicksight which is somehow not working. Can anyone please help

Datetrunc(‘week’,[datecolumn])> dateadd(‘week’,-7,datetrunc(‘week’,toda
Y(),’Sunday’))

I have tried extract(‘WD’,weekcolumn) for 1st part and for 2nd I have got below by build calculation option - adddatetime(-7,’Wk’,truncdate(‘ek’,date column)) but somehow this is not working

HI @Nisha
is it actually adddatetime(-7,’Wk’,truncdate(‘ek’,date column))? Because “ek” should be “wk”.
Otherwise what is not working? Any errors?
BR

Hi Erik,
My bad that was a typo error from my part. When I am trying to perform the same calculation as present in tableau getting an incorrect argument type number error.

Why do you want to extract the week of the weekcolumn? is the weekcokumn date format?

Did this solution work for you? I am marking this reply as, “Solution,” but let us know if this is not resolved. Thanks for posting your questions on the QuickSight Community!