Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

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
Anonymous
Not applicable
Author

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.

MK9885
Master II
Master II

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

Anonymous
Not applicable
Author

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

cazztfplease
Creator
Creator

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%')

Anonymous
Not applicable
Author

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

Anonymous
Not applicable
Author

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

Anonymous
Not applicable
Author

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

cazztfplease
Creator
Creator

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

Anonymous
Not applicable
Author

Sorry , I changed it to dimension.