Create WoW and YoY calculation

Hi All,

I have week_skey in the form of (Year_weeknumber i.e. 202401, 202402 etc. ). and a calculated field Rate (numerator/denominator). I need to calculate WoW calculation for the most recent week only, which is dynamic and would update every week

I was able to calculate WoW calculation for my analysis using difference({Rate }, [{week_skey} DESC], 1,[{category}]), but it appears like this in my analysis. How do I change it to only calculate for recent week?
Also would appreciate any help on YoY in similar scenario

Hi,

Try this on in filter
image

or

use the order by asc or desc.

Regard,
Naveed Ali

Hi Naveed, thank you for the response. Though that doesn’t resolve the issue as the data for all the weeks won’t be displayed then and would be displayed only for last week. I want ERAC to be displayed for all weeks but WOW to be displayed only for last week

Hi @anubhatr, besides using SQL or joining with the calendar dataset – I’m out of ideas. Sorry, currently this is not possible.

Hi @anubhatr, 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!