Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi.
I created a master calendar using Josh Goods creating a master Calendar post. I have tried using the week (I have called it Colweek) field to specify a week to sum data as below: ie sum the quantity collected for week 24.
sum({< ColYear=(2018),ColWeek=(24)>} [Quantity Collected])
Unfortunatly it does not work, Also how would I specify it to sum for the current or previous week instead of specifying week n umbers.
Many thanks
del
May be this?
sum({< ColYear={'2018'},ColWeek={'24'}>} [Quantity Collected])
Thanks very much. is there a way of instead of specifying 24 I can put current week or previous week
try this
for Max week
sum( {< Week={$(=max(Week))} >} Data )
You can try this,
Current week,
sum({< ColYear={"$(=Max(ColYear))"},ColWeek={"$(=Max(ColWeek))"}>} [Quantity Collected])
Previous week,
sum({< ColYear={"$(=Max(ColYear))"},ColWeek={"$(=Max(ColWeek)-1)"}>} [Quantity Collected])
Thanks have copied and pasted it into the KPI measure but it gives me a zero value
try
=max(ColYear) and see what value your getting?
or else share sample app
Thanks.
I believe the problem may be that the Colweek goes to 52 as I have data for 2017 (weeks 1-52) and the formula is looking up the year 2018 as max year and week 52 as that the max week in the filed. Can you specify ColWeek = today's date week number.
Thnaks
Del
Hi.
I used this in the end
Sum({<ColWeek = {"$(=Week(Today()))"}>}[Quantity Collected]) for current week
That may be becas of you don't have values in the maximum week.
Try this,
Current week,
sum({< ColYear={"$(=Max({<ColWeek={'=[Quantity Collected]>0'}>}ColYear))"},ColWeek={"$(=Max({<ColWeek={'=[Quantity Collected]>0'}>}ColWeek))"}>} [Quantity Collected])
Previous week,
sum({< ColYear={"$(=Max({<ColWeek={'=[Quantity Collected]>0'}>}ColYear))"},ColWeek={"$(=Max({<ColWeek={'=[Quantity Collected]>0'}>}ColWeek)-1)"}>} [Quantity Collected])
If possible please share the sample application.