en
Welcome Guest! To enable all features please Login or Register.
Options
Go to last post Go to first unread
Anmol Sunsoa  
#1 Posted : Wednesday, August 17, 2016 8:03:19 AM(UTC)
Anmol Sunsoa
Rank: Advanced Member

Groups: extranet\Forum
Joined: 5/5/2016(UTC)
Posts: 13


Hello TargIT Team,

We have created custom calculations for Sales Actual and used dynamic date to split to WTD TY and WTD LY

In the formula for Sales Actual we have: sum(d-2, 0, m1), but this only works when we have both the dynamic dates WTD TY and WTD LY


If we have just WTD TY then Sales Actual is undefined as the dimension is now d-1 so the calculation is sum(d-1, 0, m1)

So I need a calculation to say if the position is d-2 then use sum(d-2, 0, m1) else if the position is d-1 then use sum(d-1, 0, m1)

Is my logic correct?

I have used allcount but I am unsure of the syntax

Can anyone help?
Ole Arp  
#2 Posted : Thursday, August 18, 2016 7:55:54 AM(UTC)
Ole Arp
Rank: Advanced Member

Groups: extranet\Forum
Joined: 4/6/2011(UTC)
Posts: 41

In your case, a solution could be to use sum(d1,0,m1) if TY is always the first colum from the left.
Med venlig hilsen / Best regards
Ole Arp

I work as an employee with TARGIT A/S. Any statement made by me in this forum represents my own opinion and state of mind, and is not necessarily related to or representative of TARGIT A/S.
Anmol Sunsoa  
#3 Posted : Wednesday, September 14, 2016 9:43:51 AM(UTC)
Anmol Sunsoa
Rank: Advanced Member

Groups: extranet\Forum
Joined: 5/5/2016(UTC)
Posts: 13

The solution has been provided by Niels Thomsen.

If sum(@”[Week To Date Last Year]”,0,m1,-99999999) = -99999999 then
sum(d-1,0,m1) else sum(d-2,0,m1)

Niels Thomsen  
#4 Posted : Thursday, September 15, 2016 11:31:25 AM(UTC)
Niels Thomsen
Rank: Advanced Member

Groups: extranet\Forum
Joined: 4/5/2011(UTC)
Posts: 105

But actually I would agree with Ole - his solution is much simpler and works also :-)
Hope it makes sense.

Best Regards
Niels Thomsen

https://dk.linkedin.com/in/ncthomsen


Anmol Sunsoa  
#5 Posted : Wednesday, September 21, 2016 7:39:12 AM(UTC)
Anmol Sunsoa
Rank: Advanced Member

Groups: extranet\Forum
Joined: 5/5/2016(UTC)
Posts: 13

Thank you both

I agree Niels, but althought Ole has a better easier solution yours as the first solution and worked regardless so the business went with that.
It times like this when you have the 'Wish I thought of that' :-)

Kind Regards

Anmol Sunsoa
Users browsing this topic
Anonymous
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Notification

Icon
Error