cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Check out the JMP® Marketplace featured Capability Explorer add-in
Choose Language Hide Translation Bar
shampton82
Level VII

A way to show a date with no data in graph builder

Hye everyone,

I have a chart where I'd like to show each day and if there is no data for the day the date would still show but be blank.

shampton82_2-1708731461435.png

 

Here you can see that there is no data for the 22nd.  However, I would like that date to still show up.  I'm thinking I might have to use JSL to check that there is a day for ach day possible between the min and max dates in the data set and add in a dummy line item for any missing days but interested if anyone else has a different approach I could take.

 

Thanks for any ideas!

 

Steve

1 ACCEPTED SOLUTION

Accepted Solutions
jthi
Super User

Re: A way to show a date with no data in graph builder

Is your END_DATE properly formatted as a date (numeric and continuous)? Usually Graph builder will "force" you to show all dates if you have set your column as numeric continuous

jthi_0-1708873187609.png

 

-Jarmo

View solution in original post

4 REPLIES 4
hogi
Level XII

Re: A way to show a date with no data in graph builder

You could add some dummy rows - with dates, but with Freq set to 0 or missing.

hogi_0-1708786643627.png

 

dt = New Table( "test",
	Add Rows( 20 ),
	New Column( "date",
		Format( "d/m/y h:m:s", 22, 0 ),
		Formula( Today() + In Days( Row() ) )
	),
	New Column( "freq",
		Set each value(if (contains({5,6,7}, row()), . , 1) )
	)
);

dt << Graph Builder(
	Variables( X( :date ), Frequency( :freq ) ),
	Elements( Bar( X) )
)

 

jthi
Super User

Re: A way to show a date with no data in graph builder

Is your END_DATE properly formatted as a date (numeric and continuous)? Usually Graph builder will "force" you to show all dates if you have set your column as numeric continuous

jthi_0-1708873187609.png

 

-Jarmo
dlehman1
Level V

Re: A way to show a date with no data in graph builder

Now that I can once again log into the Community (as an aside, I will yet again rail against this 2 step authorization - it has made it harder to participate, and when it fails like it did this weekend, it makes it impossible - please go back to the old log in):

 

I think the question is whether you have the date with the missing data in your data set or not.  If the date is there but the data is missing, then I think if you change the data type to nominal, it will display with the data missing as you want.  If the date is not presently in the dataset (meaning that there is no data but also no row for that particular day), then I think jthi's solution will work.

shampton82
Level VII

Re: A way to show a date with no data in graph builder

I agree the two step is a step backwards!

 

In this case it was that there was no data for the date, and the suggestion from @jthi worked.  I have had times where I want the data to be Nominal and in that case you have to add in dummy data along the lines of what @hogi suggested.