Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Histogram Chart (Grafico istogramma)

Good morning everyone,

I created a histogram plot with a rule in order TASK type Sum "Sales Value" on condition EXPRESSION that makes the first brick in what is highest in terms of turnover and then to decrease.

The problem that if in 2014 the company that invoiced more was Italy and Germany in 2015 when I pass from one year to change the sequence of colors, and I do not like.

How do I take a fixed sequence data from four letters in excel sheet: I, D, E, P (Italy, Germany, East Europe, Poland)

I can not even do a sorting alphabetically.

True, I could put A, B, C, D instead of those above and then force a sorting alphabetically is that when I move the mouse on the chart out for example that B nn me is none of the four were cited.

thanks

Translated with Google Translate - Qlik Community Administrative Team

Buongiorno a tutti,

ho creato un grafico a istogramma con una regola nel TASK ordina del tipo Sum "Sales Value" sulla condizione ESPRESSIONE che fa si che il primo mattoncino sotto sia quello più elevato in termini di fatturato e poi a decrescere.

Il problema che se nel 2014 l'azienda che fatturava di più era l'Italia e nel 2015 la Germania quando passo da un anno all'altro cambia la sequenza dei colori e questo non mi piace.

Come faccio a tener fissa una sequenza data da 4 lettere nel foglio excel:   I, D, E, P  (Italia, Germania, East Europe, Polonia)

Non posso neanche fare un ordinamento alfabetico.

E vero potrei mettere A,B,C,D  invece di quei sopra e poi forzare su un ordinamento alfabetico è che quando mi muovo col mouse sul grafico esce per esempio B che nn mi rappresenta nessuno dei 4 stati citati.

Grazie

5 Replies
alexandros17
Partner - Champion III
Partner - Champion III

Di sicuro avrai come dimensione il nome della zona geografica di riferimento, supponiamo  I, D, E, P, nell'espressione scrivi:

If(Zona='I', RGB(0,255,0),

If(Zona='D', RGB(255,255,0),

If(Zona='E', RGB(0,255,255),

rgb(100,100,100)

)

)

)

Fammi sapere se funziona ...

simospa
Partner - Specialist
Partner - Specialist

Ciao Gian Paolo,

innanzi tutto ti consiglio di scrivere sul forum in inglese, più che altro perchè moltiplichi la possibilità di risposte.

Per il problema contingente, prova a usare la funzione Dual() per catalogare le aree.

Se fai una cosa di questo tipo:

Load Dual(codice,ordine) as codiceArea

Inline [codice,ordine

I,0

D,1

E,2

P,3

];


e poi carichi il resto del tuo script (posto che il codice che identifica l'area si chiami codiceArea anche nelle altre tabelle) puoi usare nella tab Ordinamento delle proprietà del grafico a barre il valore numerico corrispondente. Questo mantiene l'ordinamento delle aree.

Per i colori puoi usare la tab Colori, abilitando il flag "Colori persistenti" (più o meno, nella versione inglese è "Persistent colors").

Facci sapere.

S.

Not applicable
Author

Ciao Alessandro,

ho provato a sostituire il mio sum"Sales Value" con tuo script e sembra che mi tenga ferma la sequenza dei colori indipendente dal valore del fatturato .... potrebbe andare ...

ma la mia sequenza esatta vorrei fosse partendo dal basso

I= Italia  azzurro

D= Germania  rosso

E=Cenrtal Europe giallo

P=Polonia

Con la tua sequenza ottengo a partire dal basso

D= Germania rosso

E=Central Europe giallo

I=Italia azzurro

P=Polonia verde

Grazie!!!

alexandros17
Partner - Champion III
Partner - Champion III

Bene però la sequenza coincidde con l'ordinamento e se ordini per fatturato la sequenza cambierà sempre, nel tab di ordinamento devi ordinare per espressione dove scriverai:

If(Zona='I', 1,

If(Zona='D', 2,

If(Zona='E', 3,

4

)

)

)

Not applicable
Author

Ciao Alessandro,

ho messo questa sequenza:

If(Azienda='E', RGB(0,255,0),

If(Azienda='I', RGB(255,255,0),

If(Azienda='D', RGB(0,255,255),

If(Azienda='P', RGB(0,0,255),

rgb(100,100,100)

)

)

)

)

e sembra funzioni!!!!

Grazie 1000!