Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
stephane_kosior
Creator
Creator

Comment faire un graphique avec condition ?

Bonjour,

Je suis novice sur Qlikview et je rencontre un problème qui à mon avis va être résolu rapidement par les experts que vous êtes ...

Dans ma feuille, je souhaiterais réaliser plusieurs graphiques selon certaines conditions. Par exemple, je souhaiterais réaliser un graphique :

- qui se met à jour en fonction de la période sélectionnée (une liste de sélection)

- qui fait la somme du champs Montant

- mais je ne souhaiterais pas qu'il fasse la somme de tous les montants. Je veux uniquement les montants dont les comptes du champ "Compte" sont compris entre 700000 et 709000

Vous l'aurez compris, je veux faire un graph représentant le chiffre d'affaires !

Comment faire ?

Merci

Stéphane

1 Solution

Accepted Solutions
stephane_kosior
Creator
Creator
Author

Many many many thanks Nicole.

Kind regards,

Stephane

View solution in original post

18 Replies
Nicole-Smith

See the attached.

- Just put "Période" in a list box.

- Calculation should be: sum({<Compte={'=sum(Montant)>=700000'}*{'=sum(Montant)<=709000'}>}Montant)

stephane_kosior
Creator
Creator
Author

I think it should be :

sum({<Compte={'=Compte>=700000'}*{'=Compte<=709000'}>}Montant)


WIth this it works fine ...


Many thanks for your help. I better understand now !


Kind regards,

Stephane

Nicole-Smith

Sorry, when I did the translation, it probably was a bit off.

You can actually make what you have a bit better:

sum({<Compte={'>=700000<=709000'}>}Montant)

stephane_kosior
Creator
Creator
Author

Ok now if I would like to have within the same chart the Year-1 ?

How to do it ?

Regards,
Stephane

Nicole-Smith

See the bar chart in the attached.

Expressions:

Current Year: sum({<Compte={'>=700000<=709000'},Période={'=year(Période)=year(today())'}>}Montant)

Last Year: sum({<Compte={'>=700000<=709000'},Période={'=year(Période)=year(today())-1'}>}Montant)

stephane_kosior
Creator
Creator
Author

Many many many thanks Nicole.

Kind regards,

Stephane

stephane_kosior
Creator
Creator
Author

Arf !! I forgot to say that my fiscal year is not a calendar year how I can play with ?

Any idea how to let the system knows that the fiscal year is starting 01/09/2013

Many thanks

Stephane

Nicole-Smith

Expressions:

Current Year: sum({<Compte={'>=700000<=709000'},Période={'>=$(=makedate(year(today),1,9)<=$(=makedate(year(today),12,31))'}>}Montant)

Last Year: sum({<Compte={'>=700000<=709000'},Période={'>=$(=makedate(year(today)-1,1,9)<=$(=makedate(year(today)-1,12,31))'}>}Montant)

stephane_kosior
Creator
Creator
Author

it sounds I have some difficulties with the date where I load the ODBC ... can I use this ?

Load Date(DatefieldName,'DD/MM/YYYY') as Date

The problem that it does not work, I have an error message.

Thanks,

Stephane