Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
HI all,
I have a chart by Date. I want to calculate the avg Units and I want to show that as a straight line. Do not want to break by date.
For me it is coming as straight line, not avg.
Avg = sum(Unit)/count(day)
For my case count of days is not working in chart.
See the below chart it should show 35845.5 as 143382/4 .
I am attaching my sample App. Please check and help.
Thanks,
Sarif
i believe Your expression for SUM(Units) has a typo, it isn't restricting the data for the 4 days required,
it's missing the <= in set analysis
check the attached app
Expression below
SUM({<DateHistory_Key = {">=$(=$(vMinDate))<=$(=$(vMaxDate))"}>} AGGR( Sum(TOTAL {<DateHistory_Key = {">=$(=$(vMinDate))<=$(=$(vMaxDate))"}>} OrdersReceivedUnits)
/
count(DISTINCT TOTAL DateHistory_Key)
,CstDate))
Attaching a small App.
i believe Your expression for SUM(Units) has a typo, it isn't restricting the data for the 4 days required,
it's missing the <= in set analysis
check the attached app
Expression below
SUM({<DateHistory_Key = {">=$(=$(vMinDate))<=$(=$(vMaxDate))"}>} AGGR( Sum(TOTAL {<DateHistory_Key = {">=$(=$(vMinDate))<=$(=$(vMaxDate))"}>} OrdersReceivedUnits)
/
count(DISTINCT TOTAL DateHistory_Key)
,CstDate))
This?
=Sum({<DateHistory_Key = {'>=$(=$(vMinDate)) <$(=$(vMaxDate))'}>} OrdersReceivedUnits)/ count(distinct DateHistory_Key)
If not, please explain your expected output.