Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
ajaykumar1
Creator III
Creator III

Need Small Help

Hi Everyone,

I need to get the below output in pivot table.I forgot basic formuale 🙂

Logic : 80/1396=5.7%

            137/1396 =9.8%

Input :

Sales IdSales CountryGroupSale ASales BSales CSales DSales ESales FTotal
234India 80137401077801396
235US 1622464483056381088315
236UK 010066067
237Malaysia 000014521014521
238Singapore 00609500956
239Norway 0255203097601434
240AU 411038202740770
Output(Background color is not important)
Sales IdSales CountrySale ASales BSales CSales DSales ESales F
234India5.7%9.8%28.7%0.0%55.7%0.0%
235US19.5%5.6%5.8%0.0%67.8%1.3%
236UK0.0%1.5%0.0%0.0%98.5%0.0%
237Malaysia0.0%0.0%0.0%0.0%100.0%0.0%
238Singapore0.0%0.0%0.6%0.0%99.4%0.0%
239Norway0.0%17.8%14.2%0.0%68.1%0.0%
240AU0.5%14.3%49.6%0.0%35.6%0.0%

More Thanks,

Ajay

1 Solution

Accepted Solutions
senpradip007
Specialist III
Specialist III

PFA, hope it will reach your target.

View solution in original post

8 Replies
senpradip007
Specialist III
Specialist III

Try with Sum([Sales Amount]) / Sum(total [Sales Amount])

avinashelite

Try like this in the Expression:

sum(sales_Amount)/sum({1}sales_Amount)

ajaykumar1
Creator III
Creator III
Author

thanks Pradip

i tried same formula earlier also, getting below result

Logic : 80/1396=5.7%  BUT AM GETTING 0.00291

            137/1396 =9.8% BUT AM GETTING 0.004989

Because its calculating over all result like ;

1396
8315
67
14521
956
1434
770

Total =27459

So its giving result like; 80/27459 =0.00291 but we dont want this.

More thanks,

Ajay


avinashelite

Hi

If you want in % format then try like this:

Num(sum(sales_Amount)/sum({1}sales_Amount),'#,##0%') this will give the desired result.

Or go to numbers tab and select the expression>select percentage option

senpradip007
Specialist III
Specialist III

PFA, hope it will reach your target.

jagan
Luminary Alumni
Luminary Alumni

Hi,

Try this expression

=Sum([Sales Amount]) / Sum(total <Country> [Sales Amount])


Regards,

Jagan.

MarcoWedel

Minor change:


=Num(Sum([Sales Amount]) / Sum(total <[Sales ID], [Sales Country]> [Sales Amount]),'##0.0%')


Hope this helps

Regards

Marco

ajaykumar1
Creator III
Creator III
Author

Thanks Pradip and All,

its working fine