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

Just Show Month in bar chart

Is there a way I can have the x (dimension) show just each month that is there in the dataset? The dimension is a timestamp and I'm effectively using =Date([mydimension]) and that works. I tried using Month (and MonthStart; not sure of the difference yet) but those just binned everything (which is not valid for the cumulative values in my measure).

 

jbchurchill_1-1620227200903.png

 

Labels (2)
4 Replies
Dalton_Ruer
Support
Support

If I'm understanding your data is cumulative.

Option 1: You need a flag in your load script that tells you if the date is the First date of the month or the Last date of the month and then show only those dates. You would need to use a FirstSortedOrder function because perhaps your first data point is April 3, which wouldn't match April 1. 

Option 2: If you have values for every single day, then you IF condition like IF(Date = MonthStart(Date), Date)

That will only show the date values that are the first of the month. 

Dalton_Ruer_0-1620232983203.png

Be sure to uncheck the box "Include null values" or you will get a grey bar with value for all of the other dates that are not the first of the month. 

Dalton_Ruer_1-1620233017023.png

 

jbchurchill
Creator
Creator
Author

Thanks Dalton - There is good "know-how" in that reply. I'd prefer not to bin the dates by month, I was hoping to just have an X axis that just shows the month (but keeps the values for each date in the chart). Maybe that isn't quite doable.

Dalton_Ruer
Support
Support

Can you draw an example of what you mean? 

 

jbchurchill
Creator
Creator
Author

Sorry - I'm just getting back to this (it hasn't been important to me to finish it so I just dropped the idea).  I'm not much of an artist, I simply meant to have the data show exactly as it does in the original screenshot that I posted

https://community.qlik.com/t5/image/serverpage/image-id/54359i5CF6B35289D1027D/image-size/medium?v=v...

But to have the labels for the X axis specify only month ... so instead of April 11th and April 25 (currently labeled as 4/11/2021 and 4/25/2021), there would just be one label for the month in the approximate area of April labeled as "April" and nothing more (maybe it would be misleading anyway for it to be that generic).