Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hi,
I try to show last month sales by customers but the PREVIOUSMONTH function gives me a blank column.
The PARALLELPERIOD function gives me a sum of the sales for last month AND last year last month. (August 2017 + August 2018).
The DATEADD function gives me the same result as the PARALLELPERIOD function.
These results are obviously not what I expect.
(Yes I do have a date table with a relationship between my date table and my sales table.)
Here's a screenshot of my report.
Could someone help ?
Thank you
Solved! Go to Solution.
Hi @Anonymous,
Since you dont have a slicer selected in the current page to identify which year and if you always want it to default to the todays date the below formula works for you.
= CALCULATE(SUM(Sales[Revenue]),DATESBETWEEN('Calendar'[Date],EOMONTH(TODAY(),-14)+1,EOMONTH(TODAY(),-13)))
Hi @Anonymous,
You need to add dates to your table to display the previous month since you are using Dates[Date].
But if you always want to see the previous month irrespective of the month you selected you can use below formula to compute the same.
Hi clokeshreddy,
Since I created a viz with months in which I selected the current month, it works !
Now I'm trying to create a "Last Month Last Year" measure. The DAX formula I entered is :
Last Month Last Year = CALCULATE([Last Month Sales];SAMEPERIODLASTYEAR(Dates[Date]))
It gives me the same result as my "Last Month Sales" measure.
Do you have any idea why I'm getting this ?
Thank you very much !
Hi @Anonymous,
Since you dont have a slicer selected in the current page to identify which year and if you always want it to default to the todays date the below formula works for you.
= CALCULATE(SUM(Sales[Revenue]),DATESBETWEEN('Calendar'[Date],EOMONTH(TODAY(),-14)+1,EOMONTH(TODAY(),-13)))
It works perfectly !! Thank you so much !!!
See if my Time Intelligence the Hard Way provides a different way of accomplishing what you are going for.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
104 | |
75 | |
46 | |
39 | |
33 |
User | Count |
---|---|
165 | |
90 | |
66 | |
46 | |
43 |