Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

sloman123
New Contributor

Bar chart monthly

Hi

Can someone tell me how to do a bar chart like below. I cant get it right.

example.PNG

8 Replies
jsf_fasoli
Contributor II

Re: Bar chart monthly

Do you have a calendar? If yes, put your yearmonth as dimension, if not put Monthname([Created date])) as Dimension.

Create two expressions, one for the created date and another one with Decision

The created one should be Count(DISTINCT [Created date])

The decision date one should be similar.

sloman123
New Contributor

Re: Bar chart monthly

Thanks, but it doesn't present the right data. Please see below. One pic with Distinct Count and the other with only Count.

The third pic shows the real data.

I am thinking the problem is the dimension? It should be a neutral date/calendar? That's not connected to Createddate or decisiondate?

Count.PNGdistinct.PNGTrue.PNG

Luminary
Luminary

Re: Bar chart monthly

Hi! I would suggest that you get your database in different shape so you can use month as dimension:

LOAD

*

INLINE [

Date,Type

2017-01-05,Decision

2017-02-06,Decision

2017-01-02,Created

2017-01-04,Created

2017-02-04,Created

2017-02-05,Created

]

Then in the bar chart use:

Dimension: Month(Date)

Dimension: Type

Measure: Count(Type)

Capture.PNG

agigliotti
Honored Contributor II

Re: Bar chart monthly

let's try using the below script:

fact_table_created:

load

[created date],

[created date] as CalendarDate

from your_table where len(trim([created date])) > 0;


fact_table_decision:

load

[decision date],

[decision date] as CalendarDate

from your_table where len(trim([decision date])) > 0;

finally in your bar chart you can use MonthName(CalendarDate) as dimension.


sloman123
New Contributor

Re: Bar chart monthly

Hi

I get an error,

trim.PNG

agigliotti
Honored Contributor II

Re: Bar chart monthly

i think you should replace "your_table" with your real table name.

and i guess you have to replace "from" with "Resident" if you already loaded it.

sloman123
New Contributor

Re: Bar chart monthly

Embarrassing, of course. I will check it out when I can give it my full attention. I will get back to you.

Thanks

jsf_fasoli
Contributor II

Re: Bar chart monthly

Can you share de qvf with this data?

Thanks!

Community Browser