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.
I need to produce a summary of various stats for different one month periods, for example, last month, two months ago and so on. I have used this code:
1m Ago Volume = CALCULATE(SUM('Results'[USD Amount]),
DATESBETWEEN('Results'[Trade Date],
Date(YEAR(EDATE(today(),-1)),MONTH(EDATE(today(),-1)),1),
EOMONTH(today(),-1)))
And…
2m Ago Volume = CALCULATE(SUM('Results'[USD Amount]),
DATESBETWEEN('Results'[Trade Date],
Date(YEAR(EDATE(today(),-1)),MONTH(EDATE(today(),-2)),1),
EOMONTH(today(),-2)))
The problem is that I have just updated the data to include January’s data and none of the ‘1m Ago Volume’ or ‘2m Ago Volume’ has updated. Any ideas what I've done wrong please?
Solved! Go to Solution.
Hi @wooand
Give this a shot
1m Ago Volume = CALCULATE ( SUM ( Results[USD Amount] ), DATESINPERIOD ( Results[Trade Date], SELECTEDVALUE ( Results[Trade Date] ), -2, MONTH ) )
or
1m Ago Volume = CALCULATE ( SUM ( Results[USD Amount] ), DATESINPERIOD ( Results[Trade Date], TODAY (), -2, MONTH ) )
Hi @wooand
Give this a shot
1m Ago Volume = CALCULATE ( SUM ( Results[USD Amount] ), DATESINPERIOD ( Results[Trade Date], SELECTEDVALUE ( Results[Trade Date] ), -2, MONTH ) )
or
1m Ago Volume = CALCULATE ( SUM ( Results[USD Amount] ), DATESINPERIOD ( Results[Trade Date], TODAY (), -2, MONTH ) )
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 |
---|---|
105 | |
93 | |
75 | |
62 | |
50 |
User | Count |
---|---|
146 | |
109 | |
106 | |
88 | |
61 |