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

Announcements
Discover how organizations are unlocking new revenue streams: Watch here
cancel
Showing results for 
Search instead for 
Did you mean: 
adminkare
Contributor III
Contributor III

help for KPI

Hi help me pls,

I want to try for KPI a example. I want to see the sum of those with a value of 1.  How will i do?

Calculation for B:

  

if(sum(Aggr(SUM({<secim_no={"8"}>}[AK PARTİ]), A ))

>

sum(Aggr(SUM({<secim_no={"8"}>}CHP), A ))

,1,0)

ghelp.PNGhelp1.PNG

1 Solution

Accepted Solutions
sunny_talwar

May be this

Sum(Aggr(If(Sum(Aggr(Sum({<secim_no={"8"}>} [AK PARTİ]), A)) > Sum(Aggr(Sum({<secim_no={"8"}>} CHP), A)), 1, 0), Chart_Dimension_Here))

View solution in original post

12 Replies
sunny_talwar

May be this

Sum(Aggr(If(Sum(Aggr(Sum({<secim_no={"8"}>} [AK PARTİ]), A)) > Sum(Aggr(Sum({<secim_no={"8"}>} CHP), A)), 1, 0), Chart_Dimension_Here))

adminkare
Contributor III
Contributor III
Author

its ok! perfect.. Thank u sir...

adminkare
Contributor III
Contributor III
Author

Hi sir,

So how do I give the color this Chart?

sunny_talwar

Color to this chart? Have you mistakenly posted your question on this thread? I see no reference of any chart here... we were working on a KPI object here....

adminkare
Contributor III
Contributor III
Author

Oh ok. sorry..

I try code in Chart graph too... and its work...

Sum(Aggr(If(Sum(Aggr(Sum({<secim_no={"8"}>} [AK PARTİ]), A)) > Sum(Aggr(Sum({<secim_no={"8"}>} CHP), A)), 1, 0), Chart_Dimension_Here))

So how do I give the color this Chart?

help2.PNG

sunny_talwar

I will have to test it out... would you be able to share a sample?

adminkare
Contributor III
Contributor III
Author

           Ok sir. 1st and 2nd colums :

1st column:

Sum(Aggr(

    if(

(sum(Aggr(SUM({<secim_no={"8"}>}[AK PARTİ]),[İL ADI],[SANDIK NO],[İLÇE_ADI],MAHALLE_ADI,secim_no,[sandık no san],[ilçe mah]))

>

sum(Aggr(SUM({<secim_no={"8"}>}CHP),[İL ADI],[SANDIK NO],[İLÇE_ADI],MAHALLE_ADI,secim_no,[sandık no san],[ilçe mah])))

        ,1,0)

, [İLÇE_ADI]))

2nd column:

    if(

(sum(Aggr(SUM({<secim_no={"6"}>}[AK PARTİ]),[İL ADI],[SANDIK NO],[İLÇE_ADI],MAHALLE_ADI,secim_no,[sandık no san],[ilçe mah]))

>

sum(Aggr(SUM({<secim_no={"6"}>}CHP),[İL ADI],[SANDIK NO],[İLÇE_ADI],MAHALLE_ADI,secim_no,[sandık no san],[ilçe mah])))

        ,1,0)

, [İLÇE_ADI]))

i tried this:

if((Sum(Aggr(

Sum(Aggr(

Sum(Aggr(

    if(

(sum(Aggr(SUM({<secim_no={"8"}>}[AK PARTİ]),[İL ADI],[SANDIK NO],[İLÇE_ADI],MAHALLE_ADI,secim_no,[sandık no san],[ilçe mah]))

>

sum(Aggr(SUM({<secim_no={"8"}>}CHP),[İL ADI],[SANDIK NO],[İLÇE_ADI],MAHALLE_ADI,secim_no,[sandık no san],[ilçe mah])))

        ,1,0)

, [İLÇE_ADI]))

, [İL ADI],[İLÇE_ADI]))),'blue','orange')

but Painted in blue in 2 columns.:(((

sunny_talwar

I was looking for a sample qvf as this doesn't give me the option to see settings you have and also doesn't allow me to test anything out

adminkare
Contributor III
Contributor III
Author

ok i understood you sir. I created a *.qvf .. but i dont add here??

how will I do? help  me pls