2 Replies Latest reply: Dec 18, 2017 8:31 PM by Eaphy Mao RSS

    Current Week + Complete Selection KPI

    Eaphy Mao

      I have an expression which allows shows me the sum of sales for the current week. However, when I select other weeks of data the KPI always just shows the sum of sales for the latest week selected. Is it possible to write an expression show the sum of sales for everything in the selection, but at the same time when nothing is selected show the sum of sales for the current week? My current expression is below.

       

      Sum({<YearWeek={$=max({<YearWeek={"=[Year/Week Start Date]<=$weekstart(now(),-1,0)"}>}num#(YearWeek))}>}[Sales Qty])