Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi All,
I've been trying to get this working with my data with no success. I followed instructions found in the related posts but I keep coming up with a blank/wrong results.
I tried the basic tutorial scenario using the Contoso Sales sample data but I still can't get previousquarter, previousmonth to work. They just return blank.
When I use the parallelperiod method it works with Contoso data but with my data it just returns the same result as the context. Eg. previous month is the same as the current month
I'm lost, anyone else encounter this issue?
Thanks!
Solved! Go to Solution.
For the Contoso Sales sample, I used following two measures to get the sales amount of previous quarter/month. I’ve uploaded my Power BI file here. Please take a look at it to see if there is any difference with yours.
Sales_PreviousQuarter = CALCULATE ( SUM ( Sales[SalesAmount] ), PREVIOUSQUARTER ( 'Calendar'[DateKey] ) )
Sales_PreviousMonth = CALCULATE ( SUM ( Sales[SalesAmount] ), PREVIOUSMONTH ( 'Calendar'[DateKey] ) )
Best Regards,
Herbert
For the Contoso Sales sample, I used following two measures to get the sales amount of previous quarter/month. I’ve uploaded my Power BI file here. Please take a look at it to see if there is any difference with yours.
Sales_PreviousQuarter = CALCULATE ( SUM ( Sales[SalesAmount] ), PREVIOUSQUARTER ( 'Calendar'[DateKey] ) )
Sales_PreviousMonth = CALCULATE ( SUM ( Sales[SalesAmount] ), PREVIOUSMONTH ( 'Calendar'[DateKey] ) )
Best Regards,
Herbert
Thanks Herbert.
My formula wasn't wrong just the context of the date key was wrong. I kept using the full date and realized it once I saw your file.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
107 | |
100 | |
80 | |
63 | |
58 |
User | Count |
---|---|
148 | |
111 | |
94 | |
84 | |
67 |