Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Hi Everyone,
I'm a bit stuck on something. I'm trying to find previous period average sales. This on its own i've been able to do, however, where i'm getting stuck is i need to find average sales for the [date range selected on slicer] minus 7 days.
For example:
If i select date range as 25/09/20 - 30/09/20, then the 'previous period' would be 18/09/20 - 24/09/20. So it's the min date of what the user selects minus 7 days.
I tried that logic but i think i'm using the incorrect functions because i keep getting errors.
Is anyone able to shed some light on what approach i need to take?
Thanks guys!
Hi @Anonymous,
You can also take a look at the following blog to use the date function to manually define the filter range to calculate the rolling average:
Time Intelligence "The Hard Way" (TITHW)
Regards,
Xiaoxin Sheng
Hi @amitchandak - I keep getting the same average as the time period selected, rather than the average for the previous period. This is what i'm using:
var average = SUMMARIZE('FactSales', 'Date'[Date], "AverageAmount", SUM('FactSales'[SalesValue])), [AverageAmount])
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
81 | |
75 | |
60 | |
37 | |
33 |
User | Count |
---|---|
102 | |
56 | |
52 | |
46 | |
40 |