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,
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.
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 |
---|---|
110 | |
94 | |
80 | |
66 | |
58 |
User | Count |
---|---|
150 | |
119 | |
104 | |
87 | |
67 |