Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
109 | |
95 | |
77 | |
65 | |
53 |
User | Count |
---|---|
144 | |
105 | |
102 | |
89 | |
63 |