20 Replies Latest reply: Jan 22, 2017 11:25 PM by Devarasu R

# Doubt in Straight table in Qlik sense

Hi,

I want to make a straight table for showing the region wise profit percentage of sample superstore dataset in Qlik Sense but i am unable to do that so can you please suggest me what code should i write to calculate the profit percentage.

• ###### Re: Doubt in Straight table in Qlik sense

Hi,

Use below calculated column,

% of Sales Total:

=sum(Sales)/sum(Total Sales)

• ###### Re: Doubt in Straight table in Qlik sense

You need to be a bit more specific an let us know what exactly you are dealing with

Qlik Community Tip: How to Get Answers to Your Post

• ###### Re: Doubt in Straight table in Qlik sense

Hi Vineeth,

Actually I want to calculate Region Wise Profit percentage in Sample superstore dataset.

• ###### Re: Doubt in Straight table in Qlik sense

Hi Vineeth,

Actually I want to calculate Region Wise Profit percentage in Sample superstore dataset.

• ###### Re: Doubt in Straight table in Qlik sense

Sorry but i don't see what you are working with, can you a small sample in excel and also what the expected output should look like

• ###### Re: Doubt in Straight table in Qlik sense

I have 4 regions in my dataset and profit percentage in that region. So i want to calculate the profit percentage respective to the regions in straight table. Like in Pie chart % has automatically calculated.

• ###### Re: Doubt in Straight table in Qlik sense

Hi,

Have tried my attached solution? it should work for your case.

you just need to create new calculated column,

=sum(Sales)/sum(Total Sales)

Tks, Deva

• ###### Re: Doubt in Straight table in Qlik sense

Thank You Devarasu but how can we put % sign at the end and also can we round the % to only a single digit after the decimal.

• ###### Re: Doubt in Straight table in Qlik sense

Hi,

It's there under table property (just look at measure column properties. Hope this helps.

https://help.qlik.com/en-US/sense/3.1/Subsystems/Hub/Content/Visualizations/Table/table-properties-panel.htm

• ###### Re: Doubt in Straight table in Qlik sense

Num( YourExpression , '##.0%')

• ###### Re: Doubt in Straight table in Qlik sense

It didn't work

• ###### Re: Doubt in Straight table in Qlik sense

in the formatting section select "Custom"

• ###### Re: Doubt in Straight table in Qlik sense

I have also tried it but didn't work

• ###### Re: Doubt in Straight table in Qlik sense

Hi,

refer below screen shot, going forward if you have any report issues/doubt try make mock data with sample document/app then others can quickly understand u r issues. Tks

• ###### Re: Doubt in Straight table in Qlik sense

This is also not working..

• ###### Re: Doubt in Straight table in Qlik sense

this works but i didn't get any % sign.

• ###### Re: Doubt in Straight table in Qlik sense

##.0%

• ###### Re: Doubt in Straight table in Qlik sense

in your custom format, try like below,

0.0% or (#,##0.0% )

(if still not working share your expression or your app with sample data) will check and let u know. tks

• ###### Re: Doubt in Straight table in Qlik sense

Thanks Devarasu, now it is working.

• ###### Re: Doubt in Straight table in Qlik sense

Hi,

Can you help to close this thread by Mark as Correct or Helpful    so it may helpful for others.

Tks Deva