Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
On May 18th at 10AM EDT we will answer your QlikView questions live. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
satishkamath
Creator II
Creator II

Custom percentage calculation

Hi All

In below (and attached QV) I need custom percentage, How this possible please?

Capture.PNG

Perc = (TotalValue / Mar-2012 (15627.62) )* 100

So for Jan-2012 -> (8891.78/15627.62) * 100 = 56.90% and so on

(Mar-2012 value is denominator always in this case)

I appreciate your help

Thanks

1 Solution

Accepted Solutions
Gysbert_Wassenaar

See attached qvw.


talk is cheap, supply exceeds demand

View solution in original post

4 Replies
Gysbert_Wassenaar

See attached qvw.


talk is cheap, supply exceeds demand

View solution in original post

simenkg
Partner
Partner

You can create a variable that that will calculate March-value and calculate with it.

create a variable vThisMonthValue as:

=Sum({<YearMonth={$(=Only({<Date={Today}>}YearMonth))}>}Value)

then your expression becomes:

Sum(Value)/$(vThisMonthValue)

if you only need to do this for the total column, then play around with:
Dimensionality() and SecondaryDimensionality() and use them in an if:

i.e:
if(Dimensionality()=0 and SecondaryDimensionality() = 1,

sum(Value)/$(vThisMonthValue)

,

sum(Value/SomeOtherValue

)

satishkamath
Creator II
Creator II
Author

Hi Gysbert

There is no attachment please.

Thanks

satishkamath
Creator II
Creator II
Author

Hi Simen

I appreciate your prompt reply. In my case(attached QV) has only one dimension, And 'Perc'  column is aggregated, I need effect in particular this column only.

Thanks for your time and effort