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 All, please can you assist me with some help in DAX, Below I have a very basic data set. I need to either add 2 x Cac Cols or Measures of:
1. The average of the last 3 days
2. The average of last day 10 to last day 4
The DAX I'm trying is below: but stumped honestly:
Last 3 days = CALCULATE(AVERAGEX(VALUES(Query1[4G Data Volume_STD(MB)]), DATESINPERIOD(Query1[Time],LASTDATE(Query1[Time]), -3, DAY)))
I need the last 2 columns, colour coded of what the averages must be of
This is my dataset:
Solved! Go to Solution.
Thanks so much that has solved my problem, buy understanding and using the Date Table, with its time intelligence
@samue_an , Try with help from date tbale
Rolling 3 day = CALCULATE(sum(Sales[Sales Amount]),DATESINPERIOD('Date'[Date],MAX('Date'[Date]),-3,Day))
Rolling 10 till 4 Day = CALCULATE(sum(Sales[Sales Amount]),DATESINPERIOD('Date'[Date],MAX('Date'[Date])-4,-6,Day))
Thanks so much that has solved my problem, buy understanding and using the Date Table, with its time intelligence
User | Count |
---|---|
16 | |
15 | |
14 | |
12 | |
11 |
User | Count |
---|---|
19 | |
15 | |
14 | |
11 | |
9 |