Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Waïl_Riachi_Sanofi

Peut-on faire un graphique par trimestre (Quarter) sans avoir de date au format date mais seulement le nom des mois ?

Bonjour, je voudrais savoir si il était possible de faire un graphique par trimestre (Quarter) sans avoir de date au format date mais seulement le nom des mois ?

Je m'explique, j'ai une colonne contenant le nom des mois "JAN", "FEB", "APR" etc.. et j'aimerais faire des diagrammes avec une seule colonne pour Janvier Février Mars, une autre pour Avril Mai Juin etc. mais je n'ai pas de colonne avec une date au format date donc Qlik ne me propose pas la fonctionnalité Quarter.

Waïl_Riachi_0-1609923400700.png

 

Merci d'avance,

Waïl

Hello, I would like to know if it was possible to make a graph by quarter (Quarter) without having a date in date format but only the name of the months? Let me explain, I have a column containing the name of the months "JAN", "FEB", "APR" etc .. and I would like to make diagrams with a single column for January February March, another for April May June etc. but I don't have a column with a date in date format so Qlik doesn't offer me the Quarter feature.

Waïl_Riachi_0-1609923400700.png

Thank you in advance,

Waïl

 

5 Replies
Fernando_Fabregas
Creator II
Creator II

 Hi! A simple way would be to create a master dimension like the following, and use in your graph:

if( Match(YourMonth, 'JAN', 'FEB', 'MAR'), 'Quarter 1',

if( Match(YourMonth, 'APR', 'MAY', 'JUN'), 'Quarter 2' )) and so on...

Regards, Fernando

QFabian
Specialist III
Specialist III

Hi @Waïl_Riachi_Sanofi , you can create an additional table in your script, for example :

Data:

Load

fields...,

datefield,

month(datefield)  as Month

from yoursource;

 

Quarter:

Load * INLINE [

Month, Quarter

1, Q1

2, Q1

3, Q1

4, Q2

5, Q2

6, Q2

7, Q3

8, Q3

9, Q3

10, Q4

11, Q4

12, Q4

];

 

then you can use the new Quarter field in your chart.

 

QFabian
Waïl_Riachi_Sanofi
Author

Hi @Fernando_Fabregas I tried that but my still remains "Jan", "Feb" .. I don't have "Quarter 1", "Quarter 2" .. displayed

Fernando_Fabregas
Creator II
Creator II

Hi! Match() function is case sensitive, check that or use MixMatch() for case insensitive.

If it doesn't work please send us your formula to debug it.

Or use @QFabian aproach, it's more elegant...

Waïl_Riachi_Sanofi
Author

Hi ! Here is my formula : if (Match(Month, 'Jan', 'Feb', 'Mar'), 'Quarter 1', if (Match(Month, 'Apr', 'May', 'Jun'), 'Quarter 2', if (Match(Month, 'Jul', 'Aug', 'Sep'), 'Quarter 3', if (Match(Month, 'Oct', 'Nov', 'Dec'), 'Quarter 4'))))

I try MixMatch() but it doesn't work to : if (MixMatch(Month, 'Jan', 'Feb', 'Mar'), 'Quarter 1', if (MixMatch(Month, 'Apr', 'May', 'Jun'), 'Quarter 2', if (MixMatch(Month, 'Jul', 'Aug', 'Sep'), 'Quarter 3', if (MixMatch(Month, 'Oct', 'Nov', 'Dec'), 'Quarter 4'))))