Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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.
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.
Thank you in advance,
Waïl
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
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.
Hi @Fernando_Fabregas I tried that but my still remains "Jan", "Feb" .. I don't have "Quarter 1", "Quarter 2" .. displayed
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...
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'))))