The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hello Friends,
I am working on a dataset for my project and need to create a moving average. Below is the sample dataset that i am using. Can you suggest me the DAX command for the same.
Company | Date | Close |
Caplin Labs | 01-04-2016 | 215.89 |
Caplin Labs | 04-04-2016 | 221.09 |
Caplin Labs | 05-04-2016 | 215.26 |
Caplin Labs | 06-04-2016 | 212.05 |
Caplin Labs | 07-04-2016 | 213.60 |
Caplin Labs | 08-04-2016 | 212.38 |
Caplin Labs | 11-04-2016 | 211.19 |
Caplin Labs | 12-04-2016 | 213.01 |
Caplin Labs | 13-04-2016 | 212.19 |
Caplin Labs | 18-04-2016 | 211.13 |
Caplin Labs | 20-04-2016 | 207.77 |
Caplin Labs | 21-04-2016 | 206.42 |
Caplin Labs | 22-04-2016 | 203.23 |
Caplin Labs | 25-04-2016 | 199.75 |
Caplin Labs | 26-04-2016 | 199.56 |
Caplin Labs | 27-04-2016 | 198.96 |
Caplin Labs | 28-04-2016 | 195.75 |
Caplin Labs | 29-04-2016 | 194.25 |
Caplin Labs | 02-05-2016 | 196.55 |
@Abhijith_KG , based on what I got
New column = averageX(filter(Table, [Date] = earlier([Date])),[Close])
or
New measure = averageX(filter(allselected(Table), Table[Date] = max(Table[Date])),[Close])
User | Count |
---|---|
26 | |
10 | |
8 | |
6 | |
5 |
User | Count |
---|---|
33 | |
13 | |
12 | |
9 | |
7 |