Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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???
best regards, rico
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
hey,
thank you for answering.
the IntervallMatch yield the following error:
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
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