Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
Hi All,
Can someone help me with the below scenerio?
I wanted to sum the price when the product is available on both 2022 and 2021? is this something we can get using DAX?
Appreciate your support!!
Solved! Go to Solution.
Result =
VAR _filter =
INTERSECT(
CALCULATETABLE(VALUES('Table'[Customer]),'Table'[Year] = 2021),
CALCULATETABLE(VALUES('Table'[Customer]),'Table'[Year] = 2022)
)
RETURN
CALCULATE(
SUM('Table'[Price]),
'Table'[Year] = 2021,
_filter
)
Result =
VAR _filter =
INTERSECT(
CALCULATETABLE(VALUES('Table'[Customer]),'Table'[Year] = 2021),
CALCULATETABLE(VALUES('Table'[Customer]),'Table'[Year] = 2022)
)
RETURN
CALCULATE(
SUM('Table'[Price]),
'Table'[Year] = 2021,
_filter
)
@SpartaBI I am getting the below error and not able to get the answer..can you help me with it?
am sorry @SpartaBI the error is not showing now which was related to values..somehow i fixed it..but the result is blank now
@Sudharsanan hey friend, will be back to desk in few minutes. Do you want to do a quick zoom?
@Sudharsanan what is the result you want to get in the measure?
25 + 35 + 45 ? or also the valus from 2022? 5, 10 and 20?
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the September 2025 Power BI update to learn about new features.
User | Count |
---|---|
9 | |
7 | |
7 | |
4 | |
3 |
User | Count |
---|---|
15 | |
14 | |
11 | |
10 | |
9 |