Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
Hi,
I have this simple scenario where I need to calculate a rolling past 5 months (not including the current month) for a given transaction.
I have a Date table and link it to my transaction table. For unknown reason, the graph displays a sixth bar instead of 5.
Could someone help to get this fixed?
The DAX script is:
TY Actions =
VAR EndDate =
EOMONTH ( TODAY (), -1 )
VAR StartDate = EDATE ( EOMONTH ( TODAY (), -1 ), -5 ) +1
RETURN
CALCULATE (
SUM(UserActions[t_UserActions]),
CALCULATETABLE ( 'Date', FILTER ( 'Date', 'Date'[Date] >= StartDate && 'Date'[Date] <= EndDate ) ) )
Many thanks,
Guy
Solved! Go to Solution.
@Anonymous , Try a measure like
TY Actions =
VAR EndDate =
EOMONTH ( TODAY (), -1 )
VAR StartDate = EOMONTH ( TODAY (), -6 ) +1
RETURN
CALCULATE (
SUM(UserActions[t_UserActions]),FILTER ( 'Date', 'Date'[Date] >= StartDate && 'Date'[Date] <= EndDate ) )
@Anonymous , Try a measure like
TY Actions =
VAR EndDate =
EOMONTH ( TODAY (), -1 )
VAR StartDate = EOMONTH ( TODAY (), -6 ) +1
RETURN
CALCULATE (
SUM(UserActions[t_UserActions]),FILTER ( 'Date', 'Date'[Date] >= StartDate && 'Date'[Date] <= EndDate ) )
Brilliant! Thanks a lot.
User | Count |
---|---|
79 | |
74 | |
62 | |
61 | |
45 |
User | Count |
---|---|
108 | |
100 | |
91 | |
83 | |
61 |