Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I am trying to limit last 5 weeks data only for current year and past year same period.
I created 2 measures (Dynamic)
CurWeekNo and Vweek
I tried = rangemin(rangemax('CurWeekNo ', -5), 1) // Didnt work
My requirement is to get above same chart but Vweek BETWEEN CurWeekNo. Anyone can help would be appreciated. Thanks
use this:
Count({<Week={">=$(=$(vCurrWeekNo)-$(vWeek))"}>} DISTINCT Incident_Number)
You should put it on your expression, not in the dimension.
Something like this:
Edit:
- Above line chart is using the set analysis
- Below line chat is just sum(Value)
Try using set analysis to solve your issue. Something like this.
Count({< Week={">=$(CurWeekNo)-$(Vweek)"}>}distinct ID)
Hi Vegar,
I used it as,
=Count({< Week={">=$(CurWeekNo)-$(Vweek)"}>}distinct Incident_Number)
Then I tried,
=Count({< Week={">=$(CurWeekNo)-$(Vweek)"}>})
both coming up as invalid. Not really sure where is the invalid part is in this
use this:
Count({<Week={">=$(=$(vCurrWeekNo)-$(vWeek))"}>} DISTINCT Incident_Number)
Thanks for the reply _yls,
Still the its a "Invalid dimension"
I tried,
Count({<Week={">=$(=$(CurrWeekNo)-$(vWeek))"}>} DISTINCT Incident_Number)
Then,
=Num(Count({<Week={">=$(=$(CurrWeekNo)-$(vWeek))"}>} DISTINCT Incident_Number))
Also I tried totally different approach using - Aggr( If( rank(Week)<6, Week), Week) it came close but it goes to max Week number 53 but still I cant get it Currentweek number from this
I could be doing a mistake here I still cant figure it out.
You should put it on your expression, not in the dimension.
Something like this:
Edit:
- Above line chart is using the set analysis
- Below line chat is just sum(Value)
Awesome!! Work like a charm now. I sort of knew I was doing something wrong not the expression you gave me. Thanks _ylc