Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hi Experts
See attached Sample File
I am trying to dynamically calculate the last 12 months from the selcted month on the slicer.
Sample Data
https://www.dropbox.com/s/va9t5wrkxxjjpls/v1.3.pbix?dl=0
Solved! Go to Solution.
Hi
Can you please try the below dax function
Sales =
VAR CurrentDate = SELECTEDVALUE(‘Date'[End of Month Date],MAX(‘Date'[End of Month Date]))
VAR PreviousDate = CurrentDate – 365
RETURN
CALCULATE(
SUM(Table[SalesAmount]),
FILTER(
Table,
Table[End of Month Date] >= PreviousDate && Table[End of Month Date] <= CurrentDate
)
)
Hi Nitesh. The measure is not working, can you kinldy test uing the Sample file.
Hi
Can you please try the below dax function
Sales =
VAR CurrentDate = SELECTEDVALUE(‘Date'[End of Month Date],MAX(‘Date'[End of Month Date]))
VAR PreviousDate = CurrentDate – 365
RETURN
CALCULATE(
SUM(Table[SalesAmount]),
FILTER(
Table,
Table[End of Month Date] >= PreviousDate && Table[End of Month Date] <= CurrentDate
)
)
Hi Nitesh. The measure is not working, can you kinldy test uing the Sample file.
User | Count |
---|---|
140 | |
113 | |
104 | |
77 | |
65 |
User | Count |
---|---|
136 | |
117 | |
101 | |
71 | |
61 |