Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Not applicable

Count in Pivottabelle bzgl. Farbauswahl

Hallo zusammen,

ich habe eine Pivottabelle gebaut in der ich Farben einbauen muss. Wenn in einer Spalte 1x das Word 'Da' vorkommt soll dieses grün sein. Sobald das Wort 'Da' 2x vorkommt sollen diesen beiden Felder rot sein.

Bisher habe ich folgendes implemeniert was allerdings nicht funktioniert!

=if(count(Info = 'Da') >= 2, red()))

Was müsste ich anpassen?

Viele Grüße

9 Replies

Re: Count in Pivottabelle bzgl. Farbauswahl

May be this:

=If(Count({<Info = {'Da'}>} Info) >= 2, Red())

or

=If(Count(If(WildMatch(Info, '*Da*'), Info) >= 2, Red())

Best,

Sunny

bhagirath
Contributor III

Re: Count in Pivottabelle bzgl. Farbauswahl

Hi Thomas

you can use function SubStringCount

if(SubStringCount(Columnname,'Da')>1,red(),Green())

Hope this solves your problem else just share sample app

regards,

Bhagirath

Mark answer Correct/helpful

Not applicable

Re: Count in Pivottabelle bzgl. Farbauswahl

This solution doesn´t work. Look at my picture there ... for the 3 line the 2 'Da' must be colered in red!

Thank you

Not applicable

Re: Count in Pivottabelle bzgl. Farbauswahl

This solution doesn´t work. Look at my picture there ... for the 3 line the 2 'Da' must be colered in red!

Thank you

Re: Count in Pivottabelle bzgl. Farbauswahl

Would you be able to post a sample application??

Best,

Sunny

bhagirath
Contributor III

Re: Count in Pivottabelle bzgl. Farbauswahl

if(SubStringCount(Columnname,'Da')>1,red(),Green())

Not applicable

Re: Count in Pivottabelle bzgl. Farbauswahl

...

Re: Count in Pivottabelle bzgl. Farbauswahl

Do you want the count across your Werk dimension or AutoNr Dimension?

Best,

Sunny

Re: Count in Pivottabelle bzgl. Farbauswahl

Is this how you want it? 1st chart is count by the dimension Werk and second is by AutoNr


Auto.PNG


Color expression for the first chart: =If(Aggr(NODISTINCT Count({<Info = {'Da'}>} Info), Werk) >= 2, Red())

Color expression for the second chart: =If(Aggr(NODISTINCT Count({<Info = {'Da'}>} Info), AutoNr) >= 2, Red())

Attaching the application also.

Best,

Sunny

Community Browser