Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Hi All,
i have a dataset like the below and i need to show (each month), what the final sales figures were for the prior month. I.e. we are in October, so i would need to show Sept sales number ($98,500).
Month-Year | Sales |
Aug-21 | $100,000 |
Sept-21 | $98,500 |
Oct-21 |
i wrote a measure to to get the MAX sales figures where EOMONTH <= Today () - 1, however, this returns 100,000 which isn't what i want. I want to show the Actual figure for Current Month - 1. How do i return the sales figure for current month - 1?
When i do EOMONTH = Today() - 1, i get blank.
Thanks in advance.
Solved! Go to Solution.
@Anonymous ,
calculate(sum(Table[Sales]), filter(Table, eomonth(Table[Date]) = eomonth(today(),-1)) )
other option with time intelligence
MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD('Date'[Date]))
last MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD(dateadd('Date'[Date],-1,MONTH)))
@Anonymous ,
calculate(sum(Table[Sales]), filter(Table, eomonth(Table[Date]) = eomonth(today(),-1)) )
other option with time intelligence
MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD('Date'[Date]))
last MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD(dateadd('Date'[Date],-1,MONTH)))
Thanks so much! Worked like a charm!
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
76 | |
76 | |
55 | |
36 | |
34 |
User | Count |
---|---|
99 | |
56 | |
53 | |
44 | |
40 |