Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowGet inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.
Hi everyone, I have this dax that calculates the previous quarter's revenue. With the quarter slicer selected, I wanted to start calculating the quarter from year 22 which means I wanted to EXCLUDE the previous/past years and start having this measure by 2022.
Say, if I selected Q1 on the slicer, it won't calculate anything as it will going to calculate the previous year. Thanks in advance 🙂
Previous Quarter Revenue =
CALCULATE ([Revenue],
DATEADD ( Dates[Date], -1, QUARTER )
)
Solved! Go to Solution.
I don't think your formula calculates prior quarter revenue...I think it's going to calculate revenue for the date one quarter earlier.
For how to exclude prior year dates from your prior quarter calculaton try this
VAR IncludedDates =
EXCEPT(
PREVIOUSQUARTER(DateTable[Date]),
PREVIOUSYEAR(DateTable[Date])
)
RETURN
CALCULATE(
[Revenue],
IncludedDates
)
I typed it in Notepad so may/may not be syntactically correct, but should get you where you want to go.
Hope this helps!
I don't think your formula calculates prior quarter revenue...I think it's going to calculate revenue for the date one quarter earlier.
For how to exclude prior year dates from your prior quarter calculaton try this
VAR IncludedDates =
EXCEPT(
PREVIOUSQUARTER(DateTable[Date]),
PREVIOUSYEAR(DateTable[Date])
)
RETURN
CALCULATE(
[Revenue],
IncludedDates
)
I typed it in Notepad so may/may not be syntactically correct, but should get you where you want to go.
Hope this helps!
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code FABINSIDER for a $400 discount!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
85 | |
79 | |
65 | |
52 | |
30 |
User | Count |
---|---|
115 | |
114 | |
71 | |
66 | |
39 |