Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
I was created new calculated column with below DAX
Last4Weeks = IF(DATEDIFF(ClosedTickets[PResolveDate],TODAY(),WEEK)<5 && MONTH(ClosedTickets[PResolveDate]) <> WEEKNUM(today()),"YES" ,"NO")
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
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
Bumping up....
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
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
Hey @Narasimha,
First thing you want to do is make a new calculated column to hold the last day of every week:
Last Day of Week = Query[Date]+MOD(8-WEEKDAY(Query[Date],1),7)
Then, you can use the "Last Day of Week" (it is End Week2 in my dataset) column to create a filter on the chart. "End Date" in my data, should be the date you use in the formula above. This will show the last 4 weeks of the latest selected date in your slicer.
See below for the set up:
Hope this helps,
Alan
Hi @alanhodgson
Your soloution matches my requirment, but it is not working for me. I have created caluculated coloumnas like you said
Last Day of Week2 = 'Datekey'[Date]+MOD(8-WEEKDAY('Datekey'[Date],1),7)
Hey @Anonymous,
Make sure you are putting the Date field that you use for the calculated column into the "Axis" part of the visual.
Other than that, it looks correct to me. I was also able to recreate the same column again and it worked fine.
Hope this helps,
Alan
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
113 | |
97 | |
85 | |
70 | |
61 |
User | Count |
---|---|
151 | |
121 | |
104 | |
87 | |
67 |