Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Experts,
I want to get the Percentage of sales made by Dim1, Dim2 or Dim3.
I am not sure how to write the expression to achieve this.
I have straight table with below dimensions and expressions
Dimensions:
Dim1
cyclicgroup contain-Dim2 & Dim3
Expression:
sum(sales)
I have created the app with sample data.. please help..
sum(Sales) / sum( TOTAL Sales) ...will give you the % of total.
Try removing the 1st dimension and adding dim1 to the cycle. The new expresison will give you a % of total for any dim you select in the cycle group.
sum(Sales) / sum( TOTAL Sales) ...will give you the % of total.
Try removing the 1st dimension and adding dim1 to the cycle. The new expresison will give you a % of total for any dim you select in the cycle group.
Use two Expressions
1) sum(Sales)
2) sum(Sales) ..... Tick Relative option...in expression tab
Do as both guys said
Thanks for all the suggestions..
Dim1 is the main category, so i want it to be always present in the chart and want to switch between Dim2 and Dim3.
I have updated the data in the app. Please help me with the solution.
Still you can use my solution....
Create Two Expressions
1) SUM(sales)
2) SUM(sales) ...Tick Relative option in Expression Tab
use the relative box under the expression tab, the easiest way for straight forward percentage calculation.
Suraj,
You should be able to do this with the calculation of:
(Sales) / sum(total Sales)
I attached a workbook for you. QlikView recalculates the sum(sales) when you change dimensions in the group, so, your % total will change accordingly.
Would you like the Dim2 or Dim3 values to be a % of grand total or a %subtotal of Dim1 ?
Both options below. For the subtotal , use: sum( Sales) / sum(total <Dim1> Sales)
Thanks everyone for the great help