Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Announcements
QlikWorld 2020: Join us May 11 - 14, 2020 in Phoenix, AZ. Register early and save $400. Learn More
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
Highlighted
MVP
MVP

Re: How to get all values shown on x-axis

i think same answer as

Show full range when making selection

see  also attachment

5 Replies
Highlighted
MVP
MVP

Re: How to get all values shown on x-axis

i think same answer as

Show full range when making selection

see  also attachment

MVP
MVP

Re: How to get all values shown on x-axis

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..

MVP
MVP

Re: How to get all values shown on x-axis

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

Re: How to get all values shown on x-axis

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)

MVP
MVP

Re: How to get all values shown on x-axis

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);