Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

loveqliksense
New Contributor III

Calculated Dimension

Hi All,

I am trying to use percentage calculation in my visualization as a dimension.

((Curr_Value-Pre_Value)/Prev_Value)*100

How can I do it?

Thanks

12 Replies
loveqliksense
New Contributor III

Re: Calculated Dimension

I tried using

aggr((($(vDiff_value)/$(Prev_Value))*100),Percentage_change) as dimension but it shows no data generated for any of the measure. But If I check null values, it shows 143 as null value and I am trying to implement it in bar chart.

Khan_Mohammed
Honored Contributor II

Re: Calculated Dimension

Do it in the script if it work?

This may work if you have Curr_Value and Prev_Value in your table already...

((Curr_Value-Pre_Value)/Prev_Value)*100 as Calculated_Dim

Use Calculated_Dim in frontend

loveqliksense
New Contributor III

Re: Calculated Dimension

Do I need to add If condition?  and also I have variables defined for the difference in value and previous value also

cazztfplease
Contributor

Re: Calculated Dimension

This may also work, if you do not have access to the script:

num((sum(Curr_Value)-(sum(Pre_Value)))/sum(total Prev_Value), '#,##0%')

loveqliksense
New Contributor III

Re: Calculated Dimension

I am using vCurr as the Diiference and vPrev for the previous value.

loveqliksense
New Contributor III

Re: Calculated Dimension

I am using variables vCurr and vPrev for the difference and previous value simultaneously and I have access to script

loveqliksense
New Contributor III

Re: Calculated Dimension

Chris does not work as I have to use this as dimension

cazztfplease
Contributor

Re: Calculated Dimension

The OP said you wanted to use it as a measure?

loveqliksense
New Contributor III

Re: Calculated Dimension

Sorry , I changed it to dimension.

Community Browser