Hi,
I would like to calculate the median duration for d-1 excluding flag=0.
I don't want to use the filter in the menu for the date and the flag.
Any help please ?
Thanks in advance.
Hi @Betty_sam,
if you really just want to have the median for “today-1”, there is way:
You could create a calculated item, which contains values only for yesterdays durations with flag = 1:
(To get the "Missing" into the ELSE-cell you have to insert a dot ".")
For this column then you set the format to “elapsed time” and the aggregation to “median”:
With a list table with the new column as only column you get the following result:
Does this meet your requirements?
Best
Markus
Hi @Betty_sam,
could you please add some sample data and your VA version number?
Best
Markus
Hi @Betty_sam,
another question: what do you mean with "d-1"?
Best
Markus
today-1 , in this example it will be 08/06/2022
Hi @Betty_sam,
I had been workung with the Aggregated Operators in Calculated Items lately (though in VA 7.5) and hoped to find a solution using these. But it didn't work. Sorry!
Best Markus
Hi @Betty_sam,
if you really just want to have the median for “today-1”, there is way:
You could create a calculated item, which contains values only for yesterdays durations with flag = 1:
(To get the "Missing" into the ELSE-cell you have to insert a dot ".")
For this column then you set the format to “elapsed time” and the aggregation to “median”:
With a list table with the new column as only column you get the following result:
Does this meet your requirements?
Best
Markus
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
See how to use one filter for multiple data sources by mapping your data from SAS’ Alexandria McCall.
Find more tutorials on the SAS Users YouTube channel.