Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Related to finding summary and then writing back that summary

nazuk
8 - Asteroid

Hello All,

 I am new to alteryx, i have a business case, where i have a table in the following format.

 

StateZip Codetax collected(lakhs)
Rajasthan30201967
Rajasthan30201978
Rajasthan30202998
Rajasthan30202956
Rajasthan30201976
Maharashtra4110277
Maharashtra41109885
Maharashtra41102755
Maharashtra4116787

 

The user want the summary of tax just below the category . for e.g.

 

StateZip Codetax collected(lakhs)
Rajasthan30201967
Rajasthan30201978
Rajasthan30202998
Rajasthan30202956
Rajasthan30201976
Total302029154
 302019221
Maharashtra4110277
Maharashtra41109885
Maharashtra41102755
Maharashtra4116787
Total41109885
 41102762
 4116787

 

can we do this . Please suggest

5 REPLIES 5
markcurry
12 - Quasar

I think this workflow should do what you are looking for...

 

Totals Table.PNG

nazuk
8 - Asteroid

Thanks Mark. Can you also suggest me one thing where i am stuck. So basically i have a input file which is a excel file with a dynamic name as TSE082QT_DD_MM_YYYY_HHMM . This excel file has only one sheet and that also have dynamic name as sheet name. So i tried when only the file name is dynamic, we can use wildcards. But in my case the only solution we could get is through "dynamic input tool" . Since i am a beginner i am unable to understand how we have to create a formula. Can you help me on this as well?

markcurry
12 - Quasar

Unfortunately reading it *.xlsx won't work if you have a dynamic sheet name, and I don't think the Dynamic Input tool will work either.  I'd use created a batch macro, see here for details :

https://community.alteryx.com/t5/Alteryx-Designer-Knowledge-Base/How-To-Import-Multiple-Excel-Sheets...

 

Batch macros can be difficult for beginners, so another option might be the 'Wildcard XLSX Input' tool within the Crew macros, available here: http://www.chaosreignswithin.com/

 

nazuk
8 - Asteroid

Hello @markcurry ,

 

I am still stuck at this level, as user added few more formulas for creating the output:

 

So now if input is 

 

StateZip Codetax collected(lakhs)ID
Rajasthan30201967P1
Rajasthan30201978P1
Rajasthan30202998P2
Rajasthan30202956P1
Rajasthan30201976P2
Maharashtra4110277P1
Maharashtra41109885P2
Maharashtra41102755P1
Maharashtra4116787P1

 

The output should  be:

 

DateStateZip Codetax collected(lakhs)Population(crores)ID
1-Feb-20Rajasthan3020196714P1
1-Feb-20Rajasthan3020197823P1
1-Feb-20Rajasthan3020299821P2
1-Feb-20Rajasthan3020295623P1
1-Feb-20Rajasthan3020197612P2
Total  37593 
      
P1  20160 
P2  17433 
1-Feb-20Maharashtra411027778P1
1-Feb-20Maharashtra4110988598P2
1-Feb-20Maharashtra4110275556P1
1-Feb-20Maharashtra411678776P1
Total  154308 

 

 

Below are the rules:

 

Group by State:

 

1. if group name start with R, then :

 

1.Just after all records  write sum for population and tax.

2. leave a blank row after this

3. Group by id P1 and P2 and write sum for pulation and tax seprately for both the id.

4. Leave a blank row after this.

 

2. if group name start with R, then :

1.Just after all records  write sum for population and tax.

2. leave a blank row after this

 

 

 

Can you please help me on this?

 

 

 

 

 

 

markcurry
12 - Quasar

I think the attached workflow will do it for you.  So each section is given a sort number, so the normal detail lines are 0, Total Line = 1, Blank Line = 2, and the ID subtotals are 3,4....

Labels