Type of Macro
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi
I have following dataset
DATA | SALES |
A | 10 |
A | 10 |
A | 20 |
B | 30 |
B | 40 |
B | 50 |
I'm using two summarize tools to get overall sum and group by sum, I'm repeating this process for 3 different types , I would like to build macro tool for this.
Data columns name will change
Solved! Go to Solution.
- Labels:
- Data Investigation
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
I had a macro for calculating factorials that I very quickly adjusted to do a percentage of total calculation. Have a look at the attached and adjust where necessary.
It's just a normal macro, allows you to select the fields you want to calculate each record's percentage of total, and then appends those percentages to your dataset.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi
I have 2 inputs ,
one input will group by and sum
2nd input will do overall sum
so I have build a combined both by using append tool and used formula tool
do you have any macro where I can get two inputs
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
See this update to your sample. That's one way of doing either the one or the other. You could also use a list box to select between Count or Sum and use Action tools to update actions in a summarize tool (and fieldnames etc).
I think the best thing to do here is to go step by step through the first macro I shared to understand why each tool does what it does to get to a dynamic percent of total. Then make your own adjustments to get it to do what you're after (which I'm not entirely sure I understand). If you get stuck on specifics post those questions here again and we can try and get you unstuck.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi
this is the macro I'm looking for
But the only issue i'm facing while using this macro, since this data headers are sample names
when i tried to insert this macro with original data set, I'm facing error
is there any way where I can choose column headers also dynamically
