You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
Dear Friends
First of all, I am a beginner. I need help. I created a code to provide me a spent hour in sub-tasks, as shown below (figure):
Aggregate(Filter(
[Time].[Day].Members,
DateBetween([Time].CurrentMember.StartDate,
'2023-01-25','2023-02-06')
))
It is used to build the graph below:
However, my report was created with fixed date. I would like to create a code to capture the date range between 25th day from previous month and 6th day of current month, without to specify the year or month. Somebody could explain me how to modify this code to capture the range mentioned previously ? It must work with any sequencial two months ?
Thanks in advanced
Jairo
Well, I found a solution. I am sharing here. If somebody has a better one, please share here.
Aggregate(
IIf(Month(Now())=1,
[Time].[day].DateMembersBetween(
DateSerial(Year(Now())-1,12,25),
DateSerial(Year(Now())-1,1,6)),
[Time].[day].DateMembersBetween(
DateSerial(Year(Now()),Month(Now()) - 1,25),
DateSerial(Year(Now()),Month(Now()),6)
)
)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.