Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Macola and Using Wisys Agility Design Studio 1

Status
Not open for further replies.

VictorAst

Technical User
Nov 13, 2015
5
US
I have posted on SQL forum also, but was wondering if any Wisys Agility Design Studio programmers can help

I am running a pivot grid to determine sales and am needing to get a percentage difference from two Aliases I created. I have the CASE statement below to determine the Difference, but cannot figure out how to get a % Difference.

I am a novice SQL writer

CASE
WHEN oehdrhst_wv.inv_dt BETWEEN '1/1/2015' AND Dateadd(Year, -1, Getdate()) THEN -( ( oelinhst_wv.qty_to_ship - oelinhst_wv.qty_return_to_stk ) * oelinhst_wv.unit_price * ( 1 - oelinhst_wv.discount_pct / 100 ) )
WHEN oehdrhst_wv.inv_dt LIKE '%2016%' THEN ( ( oelinhst_wv.qty_to_ship - oelinhst_wv.qty_return_to_stk ) * oelinhst_wv.unit_price * ( 1 - oelinhst_wv.discount_pct / 100 ) )
END AS 'YTD Diff',

I know I may have to create a subquery, but I do not know how to run a subquery like that.

The Aliases I need to determine the % is [YTD Diff]/[YTD 2015 Sales]

Thank You
 
Why don't you just call our support department.
770-922-3530 ext 3
support@wisys.com
 
I have to second what Bob Hawk said. Wisys is incredibly helpful and you'll pretty much never go wrong. Great products too.

Software Training, Implementation, Programming and Support for Macola Progression, Macola ES, Synergy, and Crystal Reports. Check out our Macola tools:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top