Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

FlAsh92
New Contributor III

Reduce Sales amount by an Input Percentage

I am trying to calculate the nett sales from the gross sales from my fact table.

I'm planning to use the variable input Custom Object to accept a value and store it in a Variable called 'myVar'. But how do I make this value affect my total sales? 

My Nett Sales is (Gross Sales)-(myVar)%

Kindly help me with this

Labels (2)
1 Solution

Accepted Solutions

Re: Reduce Sales amount by an Input Percentage

Are you hoping to see 8,645 as your output in the second KPI box?

=Sum([Gross Sales])*(1-(Credit/100))

image.png 

View solution in original post

7 Replies

Re: Reduce Sales amount by an Input Percentage

Would you be able to share a sample qvf file where you are trying this?

FlAsh92
New Contributor III

Re: Reduce Sales amount by an Input Percentage

Hey @sunny_talwar !!

I've attached a qvf below.

It contains only one sheet, where the first KPI is the total gross sales and the Input Variable has the value 5. So, please help me display [Total Gross Sales] - 5% in the second KPI. The test data used for the .qvf is as in the screenshot attached.Percent Test.png

Re: Reduce Sales amount by an Input Percentage

Are you hoping to see 8,645 as your output in the second KPI box?

=Sum([Gross Sales])*(1-(Credit/100))

image.png 

View solution in original post

FlAsh92
New Contributor III

Re: Reduce Sales amount by an Input Percentage

Thank You so much @sunny_talwar 

FlAsh92
New Contributor III

Re: Reduce Sales amount by an Input Percentage

@sunny_talwar  would really appreciate your help on this.

Further to my initial query, I have split my sales to 2 entities. Now, I'm assigning different Credit for both entities, and need the % to be applied based on the entity names. Also I want that amount to be summed and arrive at the total Nett sales. I'm attaching a sample .qvf below, and also a screenshot of the sample data.Percent Test.png

Thanks in advance, would really appreciate your help on this.

Re: Reduce Sales amount by an Input Percentage

Check attached

FlAsh92
New Contributor III

Re: Reduce Sales amount by an Input Percentage

@sunny_talwar Thanks buddy!!