Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Brunei
Contributor
Contributor

How to create a Index Chart

Dear Colleagues,

I'm trying to create a Index chart based on 2 different dimension (year and fuel type).

The idea is to analyze and monitoring how the average cost of the car are developped during the year and split it between fuel type (e.g. petrol, diesel, electric etc.)

The issue is the denominator because the total function, aggregate the cost for the year, but don't divide to fuel type, below the formula used:

(sum( total {< WA_TYPE -= {'RIC'},[End_Date.autoCalendar.Month]=, TOTAL_AMOUNT_WA = {"<=$(vMaxCost)>=$(vMinCost)"} >} if(Year(DATA_AUTORIZZAZIONE_WA)=min(total Year(DATA_AUTORIZZAZIONE_WA)), TOTAL_AMOUNT_WA))
/
Count( total DISTINCT {< WA_TYPE -= {'RIC'},[End_Date.autoCalendar.Month]= , TOTAL_AMOUNT_WA = {"<=$(vMaxCost)>=$(vMinCost)"} >} if(Year(DATE_AUTHORITY_WA)=min(total Year(DATE_AUTHORITY_WA)), NUMERO_WA)))

How can resolve it?  In attached the result of this formula

Labels (1)
2 Replies
paimon9
Contributor
Contributor

Depends on waht kind of index. First you have to decide if you want it to be a weighted average price index, or the kind you index to 100, and let go from there. I think there's another kind too, i forget, but the two i mentioned are teh most common. The SP500 is a market weighted index while the Dow 30 is the other kind.

Brunei
Contributor
Contributor
Author

It's not necessary weighted index, I need index to 100