BAM : Crosstab : Need to get percentage of row total for each cell

Hi,
I am new to BAM. I have a requirement for which I am using crosstab. Basically, I need to show number instances per human task per user. Human Task is the row header, user is the column header, and I am using count(instance id) to fetch the count of instances. I am able to show the sum of values for each row and column, but I also need to show the percentage for each cell(based on row total).
I do not know if it is possible to fetch the total for further calculations. I believe the calculated field will be processed for each cell, and hence there will be no sum available.
Also, crosstab does not have a percent of total aggregate function.
Kindly advise.
Regards,
Himanshu

Hi,
For constructing summary, COLLECT is very useful.
1. Create one new internal table STAB having two fields.
   a) licensetype
   b) cnt
2. Suppose your original internal table is itab.
Loop at ITAB.
STAB-licensetype = itab-licensetype.
STAB-CNT = 1.
COLLECT STAB.
EndLoop.
3. In this way, you will get DISTINCT license types, and their count.
Hope this helps.
regards,
amit m.

Similar Messages

  • How to get IAttributeStrand for each Cell in Table

    Hello All,
    I am trying to set the font and size depending upon the user inputs under each cell in the table.
    For Text frame I am able to achieve this by using ITextModel->QueryStrand(). But for Table I am not able to find any function which can allow me to query the Cell Strand and allow to apply the attributes.
    Has anyone been able to achieve the same. If so please do let me know its urgent.
    Thank you all in advance.
    regards
    Farzana.

    Hi,<br /> <br />Thanks for the prompt reply. By the way I forgot to mention that we are using the same in CS3.<br />We tried as you have mentioned in your mail. But we did not find any way to achieve the ITextStoryThread from ICellConent. We tried all possible ways but we always get the Text Frame TextModel.<br />We have used following code to get TextModel for each cell. We get correct startindex and endindex for each cell and also get the valid TextModel Interface. But when we try to find out its length then it returns the whole TextModel length. <br />Thus when we try to apply different attributes for each cell then it applies to whole table. <br />E.g. When we try to apply 12 font size for 1st cell then it also applies to remaining cells.  So we think we are not able to find out correct TextModel for each cell. <br /> <br />Below is our snippet of code on what we tried.<br /> <br />ITableModel::const_iterator iterTable(tableModel->begin());<br />ITableModel::const_iterator end(tableModel->end());<br /> <br />while(iterTable != end) <br />{<br />GridAddress gridAddress = *iterTable; <br />GridID gridid= tableModel->GetGridID(gridAddress);<br /> <br />   InterfacePtr<ITableTextContainer> tableTextContainer(tableModel, UseDefaultIID());<br />   if(tableTextContainer != nil) <br />   {<br />       InterfacePtr<ITextModel> textModel(tableTextContainer->QueryTextModel());<br />       if(textModel != nil) <br />       {<br />          InterfacePtr<ITextStoryThreadDict> textStoryThreadDict(tableModel, UseDefaultIID());<br />          if (textStoryThreadDict != nil) <br />          {<br />              InterfacePtr<ITextStoryThread> textStoryThread(textStoryThreadDict->QueryThread(gridid));<br />              if (textStoryThread != nil)<br />              {<br />                 InterfacePtr<ITextModel> iTextModel(textStoryThread->QueryTextModel());<br />                 if (iTextModel != nil)<br />                 {<br />                      TextIndex startIndx;<br />                      TextIndex endIndx;<br />                      startIndx=textStoryThread->GetTextStart(&endIndx);<br />                 }<br />                 else<br />                     CAlert::ErrorAlert("iTextModel == nil");<br />             }<br />          }<br />       } <br />   }<br />                                     <br />   ++iterTable;    <br /> }<br /><br />Regards,<br />Farzana.

  • I need to get a new wifi card for my mac air. do i have to buy this from a apple store? i live fare away from an apple store.

    I spilled some red wine on my keyboard and i cannot connect to the internet any more. it says on the internet icon: Wi-fi: no harware installes. so i guess i need to get a new wifi card for my mac air. do i have to buy this from a apple store? i live fare away from an apple store. Also, I do have a macbook with software system:
    System Version:          Mac OS X 10.6.8 (10K549). can I take out the wifi card from that mack and use that one for my mac air?

    Welcome to Apple Support Communities
    Consider yourself lucky that your MacBook is still working. Now, turn it off. Wine may have damaged other parts of your computer.
    Then, take the MacBook to an Apple Store or reseller. It will be a very expensive repair, as it's not covered by warranty and the logic board has to be replaced. In some cases, it may be better to get a new MacBook.
    If you can't take it to an Apple Store, contact with Apple > http://support.apple.com/kb/HE57

  • HT1338 If I have my ITunes up to version 10.6.3, what do I need to get to version 10.7 for my new Iphone 5 to be able to work on my macbook to add my songs to my phone

    If I have my ITunes up to version 10.6.3, what do I need to get to version 10.7 for my new Iphone 5 to be able to work on my macbook to add my songs to my phone

    Hi Jeff,
    Apple ID (required for some features)
    Internet access5
    Syncing with iTunes on a Mac or PC requires:
    Mac: OS X v10.6.8 or later
    PC: Windows 7; Windows Vista; or Windows XP Home or Professional with Service Pack 3 or later
    iTunes 10.7 or later (free download from www.itunes.com/download)
    http://www.apple.com/iphone/specs.html
    Snow Leopard/10.6.x Requirements...
    General requirements
       * Mac computer with an Intel processor
        * 1GB of memory (I say 4GB at least, more if you can afford it)
        * 5GB of available disk space (I say 30GB at least)
        * DVD drive for installation
        * Some features require a compatible Internet service provider; fees may apply.
        * Some features require Apple’s MobileMe service; fees and terms apply.
    Which apps work with Mac OS X 10.6?...
    http://snowleopard.wikidot.com/
    It's been pulled from the online store & Apple Stores, so you have to call Apple to buy it, last I heard.
    Call Apple Sales...in the US: 1-800-MY-APPLE. Or Support... 1-800-275-2273
    Other countries...
    http://support.apple.com/kb/HE57

  • I sent my Iphone 5c in for repair and when they sent it back my sim card wasn't in it is there any way i can have them send it back or do I need to get a new sim card for it?

    I sent my Iphone 5c in for repair and when they sent it back my sim card wasn't in it is there any way i can have them send it back or do I need to get a new sim card for it?

    You'll have to get a new one from your carrier. I believe the shipping instructions for mail in service explicitly tell you to take it out as you will most likely not receive the same phone back. Apple doesn't repair most phones, they replace them.

  • I need to check comparative three conditions and for each output I need to perform some action. can anybody please suggest

    I need to check three comparative conditions and for each status I need to perform some action. can anybody please suggest
    Requirment:
    Need to check if a numeric value is within a number range by using comparative function. Depending on status i need to ggive a constant input to numeric function.

    Easiest is suing an array of range boundaries, e.g. as follows:
    (Found here)
    Now it is fully scalable and  independent of the number of ranges. The solution in the earlier post would get complicated quickly whenever the number of ranges or boundary locations changes.
    LabVIEW Champion . Do more with less code and in less time .

  • HT4910 I own two apple devices iPad & iPhone why don't I get five gigs of backup  for each one on iCloud?

    I own two apple devices iPad &amp; iPhone why don't I get five gigs of backup  for each one on iCloud?

    No need to guess - that's why. 5GB per account, upgradeable at a cost.

  • Do I need to have a different Apple ID for each apple product my family has so we are not sharing contacts

    Do I need to have a separate Apple ID for each apple product we own if I do not want to share my contacts with my children

    Yes. And separate user accounts on the computer if you only have one computer.
    How to use multiple iPhone, iPad, or iPod devices with one computer

  • Do we need to buy the license from SAP for EACH 'Z'form

    Hello
    I heard that, we (company) have to take license for the development of EACH adobe interactive form (even though its totally custom brand-new interactive form created from scratch), on individual form basis, is it true? (i know, its free of cost to play around with interactive forms in DEV and QA, but, if we want to move them to PROD, in that case do we need to buy the license from SAP for EACH form individually?)
    Thank you

    Thats true...license based on end user usage is required for SAP interactive forms. For more information read SAP note number 750784. The license comes in package like per 1000 users one time payment.
    Regards,
    Vaibhav

  • Need to get the overtime hours worked for Report

    Dear Experts,
    We have configured Overtime for client and it is working fine.
    But for custom report development we need to get the overtime hours worked.
    We have searched in B2 cluster and not able to identify exact overtime table.
    Request your suggestionsu2026u2026..

    Hi,
    after time elavualtion use t code PT66,  in this t.code double click on the each month(period) then you can get the internal table like ZES, SALDO, ZKO. again double click on the each internal table, you can get the information through the time types.  Like , now you want the overtime hours, 0903, 0904 with this time types you can get the each employee no. of. overtime hours.
    ZL, ZES, SALDO, TIP entries are internal table , you could not get any results from this table with using se11, se16.
    With PT_BAL00 with this report also we can get the overtime hours with the help of time events.
    Good luck
    Devi

  • Do i need to get an anti virus program for my mac mini

    do i need to get an anti-virus software?

    OS X already includes everything it needs to protect itself from viruses and malware. Keep it that way with software updates from Apple.
    A much better question is "how should I protect my Mac":
    Never install any product that claims to "speed up", "clean up", "optimize", or "accelerate" your Mac. Without exception, they will do the opposite.
    Never install pirated or "cracked" software, software obtained from dubious websites, or other questionable sources. Illegally obtained software is almost certain to contain malware.
    Don’t supply your password in response to a popup window requesting it, unless you know what it is and the reason your credentials are required.
    Don’t open email attachments from email addresses that you do not recognize, or click links contained in an email:
    Most of these are scams that direct you to fraudulent sites that attempt to convince you to disclose personal information.
    Such "phishing" attempts are the 21st century equivalent of a social exploit that has existed since the dawn of civilization. Don’t fall for it.
    Apple will never ask you to reveal personal information in an email. If you receive an unexpected email from Apple saying your account will be closed unless you take immediate action, just ignore it. If your iTunes or App Store account becomes disabled for valid reasons, you will know when you try to buy something or log in to this support site, and are unable to.
    Don’t install browser extensions unless you understand their purpose. Go to the Safari menu > Preferences > Extensions. If you see any extensions that you do not recognize or understand, simply click the Uninstall button and they will be gone.
    Don’t install Java unless you are certain that you need it:
    Java, a non-Apple product, is a potential vector for malware. If you are required to use Java, be mindful of that possibility.
    Disable Java in Safari > Preferences > Security.
    Despite its name JavaScript is unrelated to Java. No malware can infect your Mac through JavaScript. It’s OK to leave it enabled.
    Block browser popups: Safari menu > Preferences > Security > and check "Block popup windows":
    Popup windows are useful and required for some websites, but popups have devolved to become a common means to deliver targeted advertising that you probably do not want.
    Popups themselves cannot infect your Mac, but many contain resource-hungry code that will slow down Internet browsing.
    If you ever see a popup indicating it detected registry errors, that your Mac is infected with some ick, or that you won some prize, it is 100% fraudulent. Ignore it.
    Ignore hyperventilating popular media outlets that thrive by promoting fear and discord with entertainment products arrogantly presented as "news". Learn what real threats actually exist and how to arm yourself against them:
    The most serious threat to your data security is phishing. To date, most of these attempts have been pathetic and are easily recognized, but that is likely to change in the future as criminals become more clever.
    OS X viruses do not exist, but intentionally malicious or poorly written code, created by either nefarious or inept individuals, is nothing new.
    Never install something without first knowing what it is, what it does, how it works, and how to get rid of it when you don’t want it any more.
    If you elect to use "anti-virus" software, familiarize yourself with its limitations and potential to cause adverse effects, and apply the principle immediately preceding this one.
    Most such utilities will only slow down and destabilize your Mac while they look for viruses that do not exist, conveying no benefit whatsoever - other than to make you "feel good" about security, when you should actually be exercising sound judgment, derived from accurate knowledge, based on verifiable facts.
    Do install updates from Apple as they become available. No one knows more about Macs and how to protect them than the company that builds them.
    Summary: Use common sense and caution when you use your Mac, just like you would in any social context. There is no product, utility, or magic talisman that can protect you from all the evils of mankind.

  • I need to get older versions of FireFox for qa of our product

    Hello
    I need to get some older versions of Fire Fox to make sure our product will work with them.
    Thanks

    You can download older versions of Mozilla Firefox from ftp://ftp.mozilla.org/pub/firefox/releases/
    edit: replaced random unofficial download site link.

  • How to get row count(*) for each table that matches a pattern

    I have the following query that returns all tables that match a pattern (tablename_ and then 4 digits). I also want to return the row counts for these tables.
    Currently a single column is returned: tablename. I want to add the column RowCount.
    DECLARE @SQLCommand nvarchar(4000)
    DECLARE @TableName varchar(128)
    SET @TableName = 'ods_TTstat_master' --<<<<<< change this to a table name
    SET @SQLCommand = 'SELECT [name] as zhistTables FROM dbo.sysobjects WHERE name like ''%' + @TableName + '%'' and objectproperty(id,N''IsUserTable'')=1 ORDER BY name DESC'
    EXEC sp_executesql @SQLCommand

    The like operator requires a string operand.
    http://msdn.microsoft.com/en-us/library/ms179859.aspx
    Example:
    DECLARE @Like varchar(50) = '%frame%';
    SELECT * FROM Production.Product WHERE Name like @Like;
    -- (79 row(s) affected)
    For variable use, apply dynamic SQL:
    http://www.sqlusa.com/bestpractices/datetimeconversion/
    Rows count all tables:
    http://www.sqlusa.com/bestpractices2005/alltablesrowcount/
    Kalman Toth Database & OLAP Architect
    SQL Server 2014 Design & Programming
    New Book / Kindle: Exam 70-461 Bootcamp: Querying Microsoft SQL Server 2012

  • Need to display average percent of spend for each vendor in top ten

    Hi Friends,
                 I have to design a query where  I need to display top ten vendors and for that top ten vendors  need to sum the AMT and I have to calculate the average percentage of each vendor in top ten list from the total. Based and the specified range have to create exceptions.
    I am able to display top ten vendors. Now the problem is unable to calculate total of top ten vendors and average percentage of each vendor from total. like the below
         spend     Spend Ratio     Spend Percentage     
    vendor 4     121987     0.299181333     30%     80% is an A
    vendor 10     101103     0.247961917     55%     
    vendor 8     98723     0.242124806     79%     
    vendor 9     23456     0.05752742     85%     80-95% is a B
    vendor 5     12345     0.030276944     88%     
    vendor 6     10540     0.02585006     90%     
    vendor 7     9906     0.024295132     93%     
    vendor 3      9903     0.024287774     95%     95-100% is a C
    vendor 2     9899     0.024277964     98%     
    vendor 1     9874     0.02421665     100%     
    Total     407736               
    Please, suggest me to proceed further.
    Thank You.
    Manjula

    Hi manjula
    In order to get total for any key figure .... for that key figure at the query level in the  calculation tab there will be one box like calculate result as there u give sum or average accroding to ur purpose... then it will display the total or average accordingly....
    the key figure when used average for result shows average of all record conrtibutions but
    In order to display the  percentage of each vendor from total u can use
    Percentage Share of Result (%CT)
    %CT<Operand>
    Specifies how high the percentage share is in relation to the result. The result
    means the result of aggregation at the next level (interim result).
    %CT Incoming Orders specifies the share of incoming order values of each
    individual characteristic value (for example of each customer) in relation to
    the characteristic's result (for example, customer of a division).
    Regards
    vamsi

  • I upgraded my iMac to OS 10.8.2 yesterday. Now iTunes will not sync with any of my devices - Apple TV (gen 1), iPhone 5 (with new iOS 6), or first gen iPad. I get an "unknown error 1140" for each device. Any ideas?

    Because the sync error is on every single device, and all 3 are running different versions of an OS, I assume this has to do with the new Mountain Lion upgrade. I probably should have waited for 10.8.3!  Any suggestions would be greatly appreciated!

    A bit more info for those of you reading this.... the problem seemed to be in iTunes. For each connected device , if I clicked on the Photo option I could no longer select the second radio button for limiting the photos by Events, Albums, etc.  It was an all or nothing deal. But selecting all would cause the error.
    So I had read the other forum posts about the "&" symbol being the cause of the problem.  I went through iPhoto and made all of the changes. It did not work. I then looked at iTunes, using the AlbumData2.xml file listed in the other forums as a reference.  I found one album with the "&". I edited that one.  Still would not work.  So then I spent 3 hours on the phone with AppleCare last week. I talked with 4 different advisors. None of them had heard about the "&" error from the forums. We tried everything in iPhoto including repair and rebuild.  Finally we created a whole new library and reimported my master photos from my original one.  Using this option would allow me to now check off that radio button in iTunes.  BUT... I now lost all of my albums and events and would need to rebuid them.  I was not happy. They agreed and we set up time to talk this week.
    So today I talked with AppleCare again. They now have more info and said the problem has to do with iTunes and the new iPhoto 9.4. It does not like the "&" symbol anywhere in either iPhoto or iTunes. So they now have me going through everything in my iTunes library. Genre is OK but any other item cannot have " & ". I have several dozen to edit and will do it over the weekend and then restore my original iPhoto Library and see if I can finally get it all to sync. I will let you know how I make out, but apparently you need to eliminate " & " from every entry in iTunes and iPhoto.
    Quality control is not up to par with Apple these days. 

Maybe you are looking for