Forum Discussion
Sum data based on product availability by comparing years.
- 4 years ago
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 )
In case it answered your question, please accept the solution to help other members find it. Appreciate Your Kudos.
SpartaBI Logo
Visit SpartaBI website Visit SpartaBI Linkdin Visit SpartaBI Facebook
Showcase Report – Contoso By SpartaBI
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
)
In case it answered your question, please accept the solution to help other members find it. Appreciate Your Kudos.
SpartaBI Logo
Visit SpartaBI website Visit SpartaBI Linkdin Visit SpartaBI Facebook
Showcase Report – Contoso By SpartaBI
SpartaBI I am getting the below error and not able to get the answer..can you help me with it?
- SpartaBI4 years ago
Community Champion
Sudharsanan you didn't share the screenshot or I can't see it for some reason
- Sudharsanan4 years ago
Helper III
am sorry SpartaBI the error is not showing now which was related to values..somehow i fixed it..but the result is blank now
- SpartaBI4 years ago
Community Champion
Sudharsanan hey friend, will be back to desk in few minutes. Do you want to do a quick zoom?