mandmi
mandmi

Reputation: 69

Show values of measure names from previous week and make difference?

My sheet has measure names divided by ops managers and managers filtered to show values only for current week. What I need is to make new column for each of the measures to show values for previous week and then make %diff. I have seen solutions by putting week in row but is it possible this way somehow?

What I tried:

This is my sheet now.

Upvotes: 0

Views: 149

Answers (1)

Bernardo
Bernardo

Reputation: 3348

You can do this by filtering for the desired week in the Measure Value and not in the filter shelf. Create two boolean expressions that isolate your week.

Is this week? : datetrunc('week',{max([metric_date])}) = datetrunc('week',([metric_date]))

Is last week? : dateadd('week',-1,datetrunc('week',{max([metric_date])})) = datetrunc('week',([metric_date]))

Then create week specific measure values with sum(if [Is this week?] then [total_miss_cnt] end)

Repeat for previous week and then you can do a % diff. Make sure to remove and date filtering from the filter shelf.

Upvotes: 1

Related Questions