The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
Hi!
As I was doing an exercise I faced a problem. The exercise was to add another measure which shows for each time period in 2015 what the sales were in the previous quarter, using the CALCULATE and DATEADD function.
So the new measure I made was:
Hi @Anonymous ,
It seems that you have problem when create measure with Calculate () and DATEADD().
Please refer to my test pbix.
In my example, I have the sales data from 2018-2019 and a calendar table.
I have created the relationship between the two tables like below.
Then create the measure like this.
previous quar = CALCULATE ( SUM ( 'Sheet5'[Value] ), DATEADD ( 'calendar'[Date], -1, QUARTER ) )
Here is my test output.
If you still need help, please share your data sample and your desired output so that we could help further on it.
Best Regards,
Cherry
Thank you for your reply. Unfortunately this is not the solution that works for me as I already created the relationship between the two tables.
Is it possible for me to share the PBI file here? This way you can take a look yourself
User | Count |
---|---|
68 | |
63 | |
59 | |
54 | |
28 |
User | Count |
---|---|
182 | |
81 | |
64 | |
46 | |
38 |