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

How to get all values shown on x-axis

Hello,

Lets say i have this data:

DayNumberFlag
21
81
91

If i make a barchart with a Count on flag, i will get 1 on each DayNumber.

But what if i want to show 1,2,3,4,5,6,7,8,9 on the x-asis even though 1,3,4,5,6,7 doesnt have any flag?

Ive tried to make an integertable and leftjoined it but that doesnt work

1 Solution

Accepted Solutions
maxgro
MVP
MVP

i think same answer as

Show full range when making selection

see  also attachment

View solution in original post

5 Replies
maxgro
MVP
MVP

i think same answer as

Show full range when making selection

see  also attachment

MK_QSL
MVP
MVP

Have you got other day fields in your data model?

if yes use as below

Do as Below

Dimension Tab

Untick Suppress When Value is NULL

Tick Show All Values

Expression Tab

Tick Value on Data Points

Presentation Tab

Untick Suppress Zero Value

Tick Zero On Bars

Hope this helps..

tresesco
MVP
MVP

And, if you don't have all the DayNumbers even in the master table, you can produce them in the front-end using continuous dimension axis(Axes tab) like attached sample.

Not applicable
Author

What do i do if i want to link it to an integer table?

I can do like this:

IntTable:

RowNo() as ID

RowNo() as Int autogenerate(100);

left join (IntTable)

DayNumber:

DayNumber as Int,

Flag

But the problem is here, if i use Int as an dimension (i would get 100 values)

Is there any way to make the autogenerate generic so i can use the maxvalue in DayNumber (theni would only autogenerate up to the max value)

tresesco
MVP
MVP

Yes, like:

b:
load * inline [
field1,field2
2,1
8,1
9,1
];

LOAD Max(field1) as Max Resident b;
Let vMax=Num(Peek('Max'));

Load
RowNo() as field1
AutoGenerate $(vMax);