Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
Hi
I think this is a simple measure but it is alluding me. I simply want to return this months value from the below data table. I will then want to also return the previous month.
Month | Number |
Apr-24 | £0 |
May-24 | £0 |
Jun-24 | £60,000 |
Jul-24 | £1,350,000 |
Aug-24 | £1,350,000 |
Sep-24 | £1,430,000 |
Oct-24 | £3,030,000 |
Nov-24 | £7,330,000 |
Dec-24 | £7,330,000 |
Jan-25 | £25,730,000 |
Feb-25 | £25,730,000 |
Any help would be appreciated
Many thanks
Solved! Go to Solution.
@Massingc1983 , You can try using below measure
CurrentMonthValue =
VAR CurrentMonth = SELECTEDVALUE('Table'[Month])
RETURN
CALCULATE(SUM('Table'[Number]), 'Table'[Month] = CurrentMonth)
PreviousMonthValue =
VAR CurrentMonth = SELECTEDVALUE('Table'[Month])
VAR PreviousMonth = CALCULATE(MAX('Table'[Month]), 'Table'[Month] < CurrentMonth)
RETURN
CALCULATE(SUM('Table'[Number]), 'Table'[Month] = PreviousMonth)
Proud to be a Super User! |
|
@Massingc1983 , You can try using below measure
CurrentMonthValue =
VAR CurrentMonth = SELECTEDVALUE('Table'[Month])
RETURN
CALCULATE(SUM('Table'[Number]), 'Table'[Month] = CurrentMonth)
PreviousMonthValue =
VAR CurrentMonth = SELECTEDVALUE('Table'[Month])
VAR PreviousMonth = CALCULATE(MAX('Table'[Month]), 'Table'[Month] < CurrentMonth)
RETURN
CALCULATE(SUM('Table'[Number]), 'Table'[Month] = PreviousMonth)
Proud to be a Super User! |
|
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
25 | |
12 | |
9 | |
9 | |
9 |
User | Count |
---|---|
19 | |
14 | |
14 | |
13 | |
12 |