Forum Discussion
Custom Time Intelligence - Current Day in Month vs. Prior Months
- 4 years ago
Yeah, sort of. Keep in mind that this will be very wobbly at the beginning of the month. Let's say
July - starts on a Friday
August - starts on a Monday
September - starts on a Thursday
Let's assume you only have transactions Monday through Friday.
First 6 days:
July: 4 working days
Aug: 5 working days
Sept: 4 working days
I think you can see where this is going. It becomes less of a problem the older a month gets.
Hi Dlahey ,
Based on your description, please try this measure.
Measure =
VAR _date = CALCULATE(MAX('FactSalesTable'[Date]),ALL('FactSalesTable'))
VAR _day = DAY(_date)
VAR _year = SELECTEDVALUE('Calendar'[Year])
VAR _month = SELECTEDVALUE('Calendar'[Month Number])
VAR _sales = CALCULATE(SUM('FactSalesTable'[Sales]),FILTER('Calendar','Calendar'[Date]>=DATE(_year,_month,1)&&'Calendar'[Date]<=DATE(_year,_month,_day)))
RETURN
_sales
The PBIX file is attached for reference.
Best Regards,
Gao
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data