Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Last 4 week data

Hi All,

I am building a dashboard which represents data in chart for last 4 week. I have ListBoxes of Year, Month, Day.

When I select a only day it shows correct result.Ex. 03rd Dec. but when I select specific month ( like Dec), it shows data till 01st of Dec only. Again when I clear Month filter data shows correct.

For calculating I have used following set analysis.

Week1: SUM({$<[Report Day] = {">=$(=Date(Max([Report Day])-6))<=$(=Date(Max([Report Day])))"}>}[Chat Request])

Week2: =SUM({$<[Report Day] = {">=$(=Date(Max([Report Day])-14))<=$(=Date(Max([Report Day]-7)))"}>}[Chat Request])

Week3: =SUM({$<[Report Day] = {">=$(=Date(Max([Report Day])-21))<=$(=Date(Max([Report Day]-15)))"}>}[Chat Request])

Week4: =SUM({$<[Report Day] = {">=$(=Date(Max([Report Day])-27))<=$(=Date(Max([Report Day]-22)))"}>}[Chat Request])

Please help me on this..

6 Replies
MK_QSL
MVP
MVP

Provide source data or sample application..

sunny_talwar

May be you need to ignore selection in Month field?

Week1: =Sum({$<[Report Day] = {">=$(=Date(Max([Report Day])-6))<=$(=Date(Max([Report Day])))"}, Month>}[Chat Request])

Week2: =Sum({$<[Report Day] = {">=$(=Date(Max([Report Day])-14))<=$(=Date(Max([Report Day]-7)))"}, Month>}[Chat Request])

Week3: =Sum({$<[Report Day] = {">=$(=Date(Max([Report Day])-21))<=$(=Date(Max([Report Day]-15)))"}, Month>}[Chat Request])

Week4: =Sum({$<[Report Day] = {">=$(=Date(Max([Report Day])-27))<=$(=Date(Max([Report Day]-22)))"}, Month>}[Chat Request])

Anonymous
Not applicable
Author

Hi,

As per my understanding, you are selecting both date and month. Is it right?  and you want to have data from 3rd dec to 6th November even when you selected Month. Please confirm if I'm right.

Not applicable
Author

Hi Sunny,

Right now we are ignoring the month field. So it generates correct result. But user friendly perspective, we cant tell others to clear month if you wish to see weekly trend.

Hi Vishwa,

Yes, you are correct.

Not applicable
Author

Hi Sunny,

Sorry. I did not see your comment in detailed. its actual answer.

Thanks dude

sunny_talwar

That's not what I meant... Not asking users to not select it... but ignore there selection in your expression. Have you tried the expressions I gave above?

Week1: =Sum({$<[Report Day] = {">=$(=Date(Max([Report Day])-6))<=$(=Date(Max([Report Day])))"}, Month>}[Chat Request])

Week2: =Sum({$<[Report Day] = {">=$(=Date(Max([Report Day])-14))<=$(=Date(Max([Report Day]-7)))"}, Month>}[Chat Request])

Week3: =Sum({$<[Report Day] = {">=$(=Date(Max([Report Day])-21))<=$(=Date(Max([Report Day]-15)))"}, Month>}[Chat Request])

Week4: =Sum({$<[Report Day] = {">=$(=Date(Max([Report Day])-27))<=$(=Date(Max([Report Day]-22)))"}, Month>}[Chat Request])