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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
bharatkishore
Creator III
Creator III

Help in replacing the expression

Hi All,

@sunny_talwar

i have the below expression

Sum(TOTAL <[Product Group], [Part Type], Contract_Type_Group,District,[System Code]> Consumption)

In the above expression i need to add where it is sum of Consumption should be replaced by

 (sum(Consumption)*12 / Count(Distinct Year & Month))

Can you please help how to do it.

Thanks,

Bharat

Labels (1)
4 Replies
sunny_talwar
MVP
MVP

Don't really understand it. Sample? 🙂

bharatkishore
Creator III
Creator III
Author

Sunny Bhai i have an sample expression as
Sum(Consumption) and this expression should be replaced by
(sum(Consumption)*12 / Count(Distinct Year & Month)) which is done.
Now i have the above expression i.e.
Sum(TOTAL <[Product Group], [Part Type], Contract_Type_Group,District,[System Code]> Consumption)
Now i have sum( total( consumption) with some fields and in this expression i need to add
sum(total(fields) and instead of consumption i need to add this one (sum(Consumption)*12 /
Count(Distinct Year & Month))
Hope i am clear.
Please let me know Sunny Bhai if you need anything..
sunny_talwar
MVP
MVP

I won't be able to offer much help without a sample file where you can show me what you are getting and what you intend to get

MindaugasBacius
Partner - Specialist III
Partner - Specialist III

Are you looking for this?
Sum(TOTAL <[Product Group], [Part Type], Contract_Type_Group,District,[System Code]> Consumption) * 12 / Count(Distinct <[Product Group], [Part Type], Contract_Type_Group,District,[System Code]> Year & Month)