Using ABS and Sum function at a time

<?if: sum(ARCH_AMT)!='0' ?>
we were using above condition in the template to restrict data till date,but we were facing a new problem when ARCH_AMT is having multiple lines with same amount but +ve and -ve i.e 500,-500 it's doing sum and not returning data since sum would be zero.
we need to do ABS(ARCH_AMT) before doing sum so that SUM will be thousand and data will be picked up.
please suggest how can we have ABS and sum at a time
i tried
<?if: sum(ABS(ARCH_AMT))!='0' ?> and also choose conditions and It's not working.
thanks in advance.
Kind Regards,
Mahi
Edited by: mahi4luck on Mar 28, 2012 2:33 AM

store ABS(ARCH_AMT) in a variable, and use that variable in a running total
example:
suppose i have an xml structure like this:
<CATALOG>
<AMOUNT>
<ARCH_AMT>-500</ARCH_AMT>
</AMOUNT>
<AMOUNT>
<ARCH_AMT>500</ARCH_AMT>
</AMOUNT>
</CATALOG>
<?xdoxslt:set_variable($_XDOCTX,'vTotal',0)?>
<?xdoxslt:set_variable($_XDOCTX,'vAbsAmt',0)?>
<?for-each:AMOUNT?>
<?xdoxslt:set_variable($_XDOCTX,'vAbsAmt',xdoxslt:abs(ARCH_AMT))?>
<?xdoxslt:set_variable($_XDOCTX,'vTotal', xdoxslt:get_variable($_XDOCTX, 'vAbsAmt') + xdoxslt:get_variable($_XDOCTX,'vTotal'))?>
<?end for-each?>
Total: <?xdoxslt:get_variable($_XDOCTX, 'vTotal')?>

Similar Messages

  • My Ipad mini does not see my printer. my wife's ipad2 does. We both use IOS8 and upgraded at the same time. How can I remedy this?

    My Ipad mini does not see my printer. my wife's ipad2 does. We both use IOS8 and upgraded at the same time. How can I remedy this?

    OK great info!
    I found 2 possible ethernet to USB adapters:
    By "Plugable":  USB 2.0 to ethernet LAN wired network adapter - seems this will work, but I'll contact Plugable.
    2. Apple USB Ethernet Adapter
    Easily connect your MacBook Air computer to an Ethernet network with the Apple USB Ethernet Adapter. Small and light, it connects to the USB 2.0 port of your MacBook Air and provides an RJ-45 connector that supports 10/100BASE-T performance.  BUT NOT SURE IF THIS WILL WORK ON ANYTHING BUT a MacBook Air…
    One person commented: 
    This little gem used to be the device of choice for adding a second Ethernet interface to a Mac Mini Server and I'd been using one that way for about a year. After doing a software update to 10.6.6 it stopped working. Forewarned is forearmed – it appears that Apple is finally enforcing the MacBook Air system requirement.
    Thanks for any additional comments.
    Best regards,
    Steve Schulte
    Sunday 6 January 2013

  • I cannot use data and voice at the same time.

    I cannot use data and voice at the same time.
    I am on Wifi (connected) and at the same time I am on a voice call. when I switch to my RSS feed reader it does not sync it comes out with a message cannot connect to internet, I thought it is a problem with the feed reader application, IE 10 behaves the same I cannot browse when I am on a voice call.
    This is a very basic issue, am I missing something? Please help.
    My Model is lumia 820 with the latest portico update.
    TIA
    Sandeep

    I am aware that packet data via EDGE and voice cannot happen at the same time, surprisingly when I am on voice call I cannot connect to internet via Wifi too

  • Can we use exceptions and conditions at the same time?

    can we use exceptions and conditions at the same time? Are there any dependencies between exceptions an conditions?

    Exceptions are used when there are some mistakes , or exceeds the supposed values, we can highligt that in different colours for enabling the validator to notice easily. In this we are giving conditions for considering the value as exceptions. suppose, if the values is out of the range -1 to +1 then exception.
    But conditions can be considered as the restrictions given in measure level also. So please elaborate what you meant by conditions

  • COUNT() and SUM() function it not working in XDO file.

    Hi ,
    I am getting one error. Count and sum function not working proper.
    For example :
    Department 10 have 3 employee and total salary is 8750. But my report returning total employee 1 and total salary 5000
    10
    Ename Sal
    KING 5000
    CLARK 2450
    MILLER 1300
    ==================
    total employee : 1
    total salary : 5000
    Kindly help me solve this problem.
    <dataTemplate name="TEXT">
    <properties>
    <property value="upper" name="xml_tag_case" />
    </properties>
    <lexicals>
    </lexicals>
    <dataQuery>
    <sqlstatement name="Q_TEMP">
    <![CDATA[SELECT DEPTNO,DNAME,LOC FROM DEPT]]>
    </sqlstatement>
    <sqlstatement name="Q_TEMP1">
    <![CDATA[SELECT ENAME,HIREDATE,SAL FROM EMP WHERE DEPTNO = :DEPTNO]]>
    </sqlstatement>
    </dataQuery>
    <datastructure>
    <GROUP name="G_1" source="Q_TEMP">
    <element value="DEPTNO" name="DEPTNO" />
    <element value="DNAME" name="DNAME" />
    <element value="LOC" name="LOC" />
    <GROUP name="G_2" source="Q_TEMP1">
    <element value="ENAME" name="ENAME" />
    <element value="SAL" name="SAL" />
    <element value="G_2.ENAME" name="TOTL_DETAILS" dataType="number" function="COUNT()" />
    <element value="G_2.SAL" name="TOTL_SAL" function="SUM()"/>
    </GROUP>
    </GROUP>
    </datastructure>
    </dataTemplate>
    Thanks
    Yudhi

    Please have the data structure as below:
    <datastructure>
    <GROUP name="G_1" source="Q_TEMP">
    <element value="DEPTNO" name="DEPTNO" />
    <element value="DNAME" name="DNAME" />
    <element value="LOC" name="LOC" />
    <GROUP name="G_2" source="Q_TEMP1">
    <element value="ENAME" name="ENAME" />
    <element value="SAL" name="SAL" />
    *</GROUP>*
    *<element value="G_2.ENAME" name="TOTL_DETAILS" dataType="number" function="COUNT()" />*
    *<element value="G_2.SAL" name="TOTL_SAL" function="SUM()"/>*
    *</GROUP>*
    </datastructure>
    Aggregate functions to be placed at the level you require it. Here you need at G_1, so place it there.

  • Use DO and AI function in one DAQ Device

    Hi, everyone
    I try to use DO and AI function in DAQ USB-6008.
    When I run my program it shows one error message as below,
    Please suggest me how to solve this problem?
    Thank you!
    My Code:
    DAQmxCreateTask("", &gTaskHandle_DAQ1);
    DAQmxCreateTask("", &gTaskHandle_DAQ1_DO);
    DAQmxCreateAIVoltageChan(gTaskHandle_DAQ1, cChan_DAQ1, "", DAQmx_Val_Cfg_Default, min,max, DAQmx_Val_Volts, NULL);
    DAQmxCfgSampClkTiming(gTaskHandle_DAQ1, "", rate, DAQmx_Val_Rising, DAQmx_Val_ContSamps, sampsPerChan);
    DAQmxGetTaskAttribute(gTaskHandle_DAQ1, DAQmx_Task_NumChans, &gNumChannels);
    DAQmxCreateDOChan(gTaskHandle_DAQ1_DO, cChan_DAQ1_DO, "", DAQmx_Val_ChanForAllLines);  <--- Occur error

    hi, Billingsley
    My DAQ version is 7.4.4f4
          OS version is  XP Profession SP3
          LabWindows/CVI version is 8.5.0
    Thank you!

  • Can I use the wireless backup functionality of a time capsule with a PC?

    Can I use the wireless backup functionality of a time capsule with a PC?

    Yes, take a look at this link, http://techsupport.foreverwarm.com/time-capsule-windows

  • Using Wifi and Cellular/LTE at same time

    Does using Wifi and Cellular/LTE at same time cause more battery drain then just using one of them at a time?
    Just on wifi, I get 6 hours and 43 minutes of usage and 1 day on standby. Is that considered good?

    When you are playing online game, most of your Bandwidth is consumed by Xbox. May because of this you are not able to access the net on your PC. What you could is, Disable the firewall on that PC, login to the setup page for this route and enable QoS on it, under “ Gaming and Application” Tab. And set higher priority for the IP address of your PC.

  • Using ranking and sum to get top 5 products' share of total market

    Hi everybody,
    I have been playing around with ranking for a while now and I am stuck..
    I have a crosstab where I want to show the top 5 products in a specific month. So I have month in my column and products in my rows. I applied a ranking based on revenue only showing the top 5 products. This works like a charm.
    Now I would like to sum up the top 5 products' revenue and compare it with the revenue of all products in the market. I have managed to sum the top 5 products' revenue by using the "sum" function in the block, but I have not been able to compare this measure with a total market revenue measure. It seems like because I made the ranking on the top 5 products I cannot create a measure which includes more than these top 5 products and put it in that block.
    Is this not something Webi can easily handle??
    Thanks in advance!
    Best regards,
    Morten

    Hi Jaime,
    Thank for the suggestion. I forgot to mention that the month column is only showing one month. There is a filter on the month dimension, so that only one month is shown.
    I tried using the In Report context, but it gave me wrong results... It seems like it included all months.. I also tried using the noFilter function, but it also gave me wrong results.
    Best regards,
    Morten

  • Problem with group by and sum function

    In one of the report I'm using grioup by clause on one column. However when I use this function the sum function on other column is not working.
    Any idea how we can resolve this?

    Hi Tintin,
    Follow the below steps:
    1) On the order number column formula, use the max function.
    2) Duplicate the revenue column in the RPD, set the aggregation to sum and level to transaction. This will give you the sum of all the orders in a particular trasaction, where as in report you will see only the max account number.
    Assign points if helpful.
    Thanks,
    -Amith.

  • Count and sum function

    Hi,
    I want to get sum of a column, but it is giving wrong values when using sum and count functions. please help.
    But in actual excel value is different.

    Hi,
    Below is the derived table query:
    select location,
    SUM(case when priority='1'and sholders like '%niit%'then 1 else 0 end) as 'Total P1callsof NIIT',
    SUM(case when Priority='1'and sholders like '%niit%'and sla_violation=0 then 1 else 0 end) as 'TotalResolvedcallsinBHRS NIIT'
    from Stakeholders group by Location
    Am calculating the sum of 'Total P1callsof NIIT' in a summary page, which gives me incorrect value(2349) where the actual count is 581. .

  • My SB Audigy 2 card can't use headset and musicamplifier at the same time

    Hi, i just bought a SB Audigy 2 [D400] and i have downloaded drivers and programs. I run Windows XP SP2.
    The soundcard works fine but it is very very annoying that i physically have to change the jack in the green=line out jack from headset to musicamplifier when i want to use my musicamplifier and change back the jack in the green=line out from musicamplifier to headset when i just want to use the headset/headphones .
    In the shop they told my that i can connect both amplifier and headset at the same time and then with creative software control whether there is sound in the headset or in the amplifier. But i can't simple get it work.
    I tried to use the green to the amplifier and the headset/speakers in the black (line out 2) and then with creative speaker settings softeware choose headphones but still the ampliefier receive the sound and no sound in the headphones. Why? In fact no matter what configuration i try the headphones doesn't work.
    But if i change the jacks so headset is in the green line out then only headset is working and the amplifier doesn't work no matter i put it in sort=line out 2 jack or orange=line out 3 jack.
    Can somebody here tell me if it is possible or not to connect both headset and external amplifier and control by software which to play? and how?
    please help, thx.
    Michael

    If you can have an ASIO compatible music playing system, then it might be possible to have system like you wish when using Creative Audigy 2 card. Since ASIO bypasses Windows Audio System, you can use both 'drivers' (ASIO - WDM/MME/DS) side by side.
    Say you want to play a game (using headset /w mic) and someone other like to listen music at the same time. With ASIO capable system you can output your music for example to "center L/R (stereo) channels" and same time output sounds from other source (using MME/DS/WDM drivers) to normal output channel (Front L/R). Only thing is, you need to set your speakersystem to 4 or 6 (depending which other channel you're using) (and for better 'balance' to adjust "angle" on THX console. You get the THX console by installing Audigy 2 Zs software).
    Try for example http://img332.imageshack.us/img332/463/djs9mo.jpg[/img] width="406" alt="Image Hosted by ImageShack.us" >
    Another option:
    Say you want to play music through external amplifier and play game online with your headset + microphone (eg. others but you listen the music, you play games)
    --> try free http://img332.imageshack.us/img332/4589/tbp7rz.jpg[/img] width="406" alt="Image Hosted by ImageShack.us" >
    If you use ASIO on BeatPort Player you can select L/R individually from the list(s). Same rules as described earlier.
    = You can play from 2 different sources simultaoneusly (ASIO + WDM/MME/DS) to two different outputs without disturbance. The other (WDM/MME/DS) source is set 'automatically' output to (Audigy) "green" port, and the other (ASIO) to "black" or "orange" port (as set).
    .jtpMessage Edited by jutapa on 09-5-2005 05:30 AM

  • Ipod nano (5th generation) - want to use headphones and charge at the same time

    I have an ipod nano (5th generation).  Do I need a special set of headphones to use the headphone jack and charge the ipod at the same time?

    The iPod nanos have a 30 pin dock connector and a headphone jack. When you charge the iPod you use the dock connector therefore you can use and charge at the same time. You cannot use and charge the iPod shuffle at the same time. You might have the two mixed up.

  • Can we use CS6 and CC at the same time on different machines?

    We have a Creative Cloud subscription and have software downloaded to an iMac and also to a PC. I understand that we can't use the applications on both machines at the same time, but could one of my colleagues use the CS6 versions at the same time on the PC?

    Hi Carol
    A subscription to Creative Cloud gives you access to the CC version and the CS6 version of the software.  From the original question, it seemed to me that they were asking if they can share the subscription between 2 colleagues if one used the CC version and the other used the CS6 version.  That is not permitted as the subscription is licensed to one user.
    If you have a Creative Cloud subscription and a perpetual license for CS6 then you can use them concurrently on 2 machines as they are separate licenses.
    Does this help clarify?
    Thanks
    Bev

  • Cannot use copy and paste function in PSE10?

    Today i went to copy and then paste an image onto another one,i could not use the copy or paste function(in pse 10). Only the paste function was usable  and when i hit it it pasted the picture of an eagle onto the image. This eagle i had copied from a particular website(unrelated to photoshop) amd pasted it to a folder in windows live photo gallery. I tried deleting this eagle from the windows gallery,but still i could paste the eagle onto the other picture.  And it created another layer with the picture of the eagle.This is very strange. How can this be corrected. Also as usual my lassoo tool is malfunctioning in pse 10?  Maybe uninstalling  and re-installing pse 10 would solve the problem  and if so can you give me instructions on how to do this safely or refer me to a link.  Would appreciate a quick reply. Thanks!!

    Thanks Barbara for your help  and your nice explanation as to how the copy and paste function works. Never had a problem before but now it functions normally!
    Irwin Lakin
    <mailto:[email protected]> [email protected]
    508-866-4250

Maybe you are looking for

  • Can't add computer to iTunes Match (Windows)

    I subscribed to iTunes match and got a confirmation email.  When I click on "Add this computer" on iTunes, a box pops up prompting for my password.  I enter it, and  the iTunes status bar briefly flashes "accessing iTunes store" but then nothing happ

  • How to Use Sequence Object Inside User-defined Function In SQL Server

    I'm trying to call sequence object inside SQL Server user-defined function. I used  Next Value for dbo.mySequence  to call the next value for my sequence created. But I'm getting an error like below. "NEXT VALUE FOR function is not allowed in check c

  • Opening a pdf document in word

    I've downloaded and installed the trial version of Adobe but I cannot figure out how to take a pdf document and open it in word?  what do I do???

  • Acroread -landscape option not working for Reader 8.1.3 - Solaris 10

    OK I've read the other posts in which others are having this issue as well. I'm hoping this has been fixed or someone can tell me what we need to do to get this working. This use to work with Solaris 9/Reader 5 but when we upgraded to Solaris 10/Read

  • Connecting U-verse digital cable box to new iMac

    I was wondering if there was a simple solution to hooking up my digital cable box from U-verse to my new iMac so I could watch TV on it when it is not being used as a computer. Note that I do not care about recording TV onto my hard drive etc., just