Forum Discussion
Last 4 weeks data
I was created new calculated column with below DAX
Last4Weeks = IF(DATEDIFF(ClosedTickets[PResolveDate],TODAY(),WEEK)<5 && MONTH(ClosedTickets[PResolveDate]) <> WEEKNUM(today()),"YES" ,"NO")
- v-yulgu-msft9 years agoMicrosoft Employee
Hi Narasimha,
Do you want to always display the last 4 weeks data in column chart?
Suppose there are these columns in source table: ClosedTickets[PResolveDate], ClosedTickets[Amount], ClosedTickets[Category]. Then, you should create a measure using this formula:
Sum Amount = CALCULATE ( SUM ( ClosedTickets[Amount] ), FILTER ( ClosedTickets, DATEDIFF ( ClosedTickets[PResolveDate], TODAY (), WEEK ) < 5 ) )Drag this measure into value section.
If I have something misunderstood, please correct me.
Best regards,
Yuliana Gu - v-yulgu-msft9 years agoMicrosoft Employee
Hi Narasimha,
Does above suggestion as I mentioned in my original post apply to your scenario? If you have resolved your issue, please kindly mark the corresponding reply as an answer so that it can benefit more people. If you still have any question, please feel free to ask.
Regards,
Yuliana Gu- Liron9 years agoNew Member
Hi,
Thank you for this solution.
I have a simalar problem, I'll try my best to explain.
I want to present the weekly measures of the 4 last weeks, the only difference is the I want it to be filtered by a slicer- to show only the 4 weeks back from the date on the slicer. (that the last week presented would be the date on the slicer, that it would be moving).
in my data I have both weekly and rolling 28 (4 last weeks) aggregated data.
I have a slicer of dates called 'period ends on', and I want it to show the 4 last weeks according to the slicer.
How can I do it?
Thanks a lot,
Liron
- Narasimha9 years agoHelper ICan any one ping me v-lavala in pst hours..so that will work to resolve the issue
Else give ur alias..will ping me over im
Thanks
Narasinha
- Narasimha9 years agoHelper I
Hi Team,
Am getting below results while using 4weeks DAX formula,
From above Image, Am getting extra week i.e Week28.. How to exclude Week28. I just display Last4Weeks data only.
Thnaks
Narasimha Reddy
- Narasimha9 years agoHelper I
Bumping up....