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

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Calculation in the Data-editor

Hi,

one week ago i opend a discussion with the title

"calculate of a new KPI doesn't work".

fortunately we found a solution for my problem.

the calculated KPI was called PriceCalc

sum(if(ConsumptionFrom<=Consumption and Consumption<=ConsumptionTo, BasicRate+EnergyRate*Consumption,0))

now i want to know if i can calculate my values also in the data-editor???

pic3.PNG

best regards, rico

3 Replies
hic
Former Employee
Former Employee

Yes, you can. But, you need a "Group By" in your load statement. Further, you will get static values that don't change as you make selections.

Finally, what you do in your formula is a "between" comparison. You should look at IntervalMatch before you create your solution.

HIC

Not applicable
Author

hey,

thank you for answering.

the IntervallMatch yield the following error:

pic4.PNG

the 'group by' statement is known from the sql-syntax. but i can not transfer it into the qlik sense syntax.

another question is: should i calculate my values in excel before  starting with Qlik Sense? because it is an BI-Tool and now 'Calculation-Tool'??

best regards, rico

hic
Former Employee
Former Employee

You got a circular reference since you have too many keys. Read Circular References.

Your data model is really the same as a "Slowly changing dimension" where you have both an interval key, and an additional key: Tarif. Read more in Slowly Changing Dimensions and IntervalMatch and Slowly Changing Dimensions.

Finally, try the attached script...

HIC