Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more
Hi
I have a measure like this:
Amount Previous Day:=CALCULATE([Amount], PREVIOUSDAY('Dim Date'[Balance Date]), DATESYTD('Dim Date'[Balance Date]))
and it works like i expected. But when I read about CALCULATE I don't get exactly why it is working..
When i filter on period August, in the report, it still shows the previous day Amount for 1 of August, which is Amount for july 31. I thought the context was modified when I filter on August and therfore should not be a previous day amount? Why is it working like this?
Solved! Go to Solution.
hi, @jakob82
you use DATESYTD('Dim Date'[Balance Date]) function which give you dates of year which you currently itrrated. means if you current date is 2023-08-01 then it give you date from (2023-01-01) to (2023-08-01)
so your calculate filter expression filter date from (2023-01-01) to (2023-08-01).
use DATESMTD('Dim Date'[Balance Date]) which give you date only currently ittarated month
means your current date = 2023-08-10 then DATESMTD('Dim Date'[Balance Date]) give you (2023-08-01) to (2023-08-10)
Amount Previous Day:=CALCULATE([Amount], PREVIOUSDAY('Dim Date'[Balance Date]), DATESMTD('Dim Date'[Balance Date]))
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly. Appreciate your kudos
hi, @jakob82
you use DATESYTD('Dim Date'[Balance Date]) function which give you dates of year which you currently itrrated. means if you current date is 2023-08-01 then it give you date from (2023-01-01) to (2023-08-01)
so your calculate filter expression filter date from (2023-01-01) to (2023-08-01).
use DATESMTD('Dim Date'[Balance Date]) which give you date only currently ittarated month
means your current date = 2023-08-10 then DATESMTD('Dim Date'[Balance Date]) give you (2023-08-01) to (2023-08-10)
Amount Previous Day:=CALCULATE([Amount], PREVIOUSDAY('Dim Date'[Balance Date]), DATESMTD('Dim Date'[Balance Date]))
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly. Appreciate your kudos
User | Count |
---|---|
14 | |
10 | |
9 | |
9 | |
8 |