Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
jlampard40
Contributor III
Contributor III

Median for today's date only

Hi guys

I have the flu and am completely dead on my knees but need to get this work completed by Friday and am coming up against problems which I can't resolve in my current state!  I need to work out the median of a set of data, but only relating to data with today's date on it.

I've done something similar for a basic count i.e. 

=count({$<[WBR_Stat_Date]={"=$(=Date(Today(),'DD/MM/YYYY'))"}>} DISTINCT [WBR_Event_Key])

But I can't replicate the same for median as it is based on a calculation of the difference between two fields i.e. WBR_Event_Date and WBR_Clock_Reset_Date.  I then need the median of this calculation but only for today's date (we have daily feeds of data and I need to only show the current (today's figures).  Thanks guys!

This is the formula I have so far but it's obviously looking at ALL the data.  I just need to slip in there somewhere to look at just today's date using today() in there somewhere...!!

=num(median([WBR_Event_Date]-[WBR_Clock_Reset_Date]),'#,###')

1 Reply
sunny_talwar

Is this really working?

=Count({$<[WBR_Stat_Date] = {"=$(=Date(Today(),'DD/MM/YYYY'))"}>} DISTINCT [WBR_Event_Key])

I see an extra '=' before $(= in the set modifier... I feel like it should be this

=Count({$<[WBR_Stat_Date]={"$(=Date(Today(),'DD/MM/YYYY'))"}>} DISTINCT [WBR_Event_Key])

Anyhow, getting back to your question... have you tried this?

=Num(Median({$<[WBR_Stat_Date]={"$(=Date(Today(),'DD/MM/YYYY'))"}>} RangeSum([WBR_Event_Date], -[WBR_Clock_Reset_Date])),'#,###')