Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello everyone,
I hope all is well.
Bellow is the result of a sql query in qlikview :
kpi sum(revenue)
My objective first to divise the sum(revenue) by 1000 whene kpi='Recharged'
and then to gather data revenue stc and data revenu with recharged / Others Revenue + Oterhrs Revenue => Other Revenu
the result would be like this :
recharged 1255
other revenue 545
outgoing call revenue 245
outgoing sms revenue 544
Thanks
Not sure what you are looking to get. What are the numbers behind your expected result?
First:
if(kpi = 'Recharged',
sum(revenue) / 1000)
The second part I did not understand.
if kpi =data revenue or kpi = data revenue stc then kpi =Recharged
recharged = sum(kpi='recharged',revenue)/1000+sum(kpi='data revenue', revenue)+sum(kpi='data revenue stc', revenue)
and also : if kpi =othres revenue or kpi = otehrs then kpi =other revenu
In script do
if(kpi = 'DATA Revenue' or kpi = 'DATA Revenue stc', 'Recharged',
if (kpi = 'Othres Revenue' or kpi = 'Otehrs Revenue', 'Other Revenu',
kpi)) as New_Kpi
The rest do in expression.