Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hey guys,
I need your help, I'm not able to build a metric in dax that says the following: that takes the last collection of all customers who have records (prices) in the last 7 days and makes an average of these values
Can you help me?
Thank you since
Solved! Go to Solution.
Hi @FarhanAhmed ,thanks for the quick reply, I'll add more.
Hi @Lwpro ,
The Table data is shown below:
Please follow these steps:
1. Use the following DAX expression to create a measure
Measure =
VAR _a = TODAY()
VAR _b = _a - 6
RETURN
AVERAGEX(FILTER('Table','Table'[Date] >= _b && 'Table'[Date] <= _a),'Table'[price])
2. Final output
Best Regards,
Wenbin Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @FarhanAhmed ,thanks for the quick reply, I'll add more.
Hi @Lwpro ,
The Table data is shown below:
Please follow these steps:
1. Use the following DAX expression to create a measure
Measure =
VAR _a = TODAY()
VAR _b = _a - 6
RETURN
AVERAGEX(FILTER('Table','Table'[Date] >= _b && 'Table'[Date] <= _a),'Table'[price])
2. Final output
Best Regards,
Wenbin Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Can you please share sample data and desired output
Proud to be a Super User!
Unfortunately not because it is sensitive data. But the basis is like this:
What I'm trying to create is to take the last dates (most recent) bring the last prices within the 7 days and make an average between them
User | Count |
---|---|
98 | |
90 | |
77 | |
71 | |
64 |
User | Count |
---|---|
115 | |
102 | |
98 | |
71 | |
67 |