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!Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
Hi everyone,
My dataset is like this:
Account Date Value
A 31/12/2022 $200
B 31/12/2022 $300
C 31/12/2022 $100
A 31/12/2021 $700
B 31/12/2021 $400
C 31/12/2021 $200
I need to sum, for example, only the values A and C for the 2022. What's the best way or DAX expression to do this?
Thanks you for helping me!!
Solved! Go to Solution.
Hi, @Vegas95 ;
I've made a little modification here.
Sum of A + C = CALCULATE(SUM([Value]),FILTER('Table', YEAR([Date])=2022 && ([Account] ="A" || [Account] ="C")))
Or
Sum of A + C = CALCULATE(SUM([Value]),FILTER('Table', YEAR([Date])=2022 && ([Account] in {"A" ,"C"})))
The final show:
Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @Vegas95 ;
I've made a little modification here.
Sum of A + C = CALCULATE(SUM([Value]),FILTER('Table', YEAR([Date])=2022 && ([Account] ="A" || [Account] ="C")))
Or
Sum of A + C = CALCULATE(SUM([Value]),FILTER('Table', YEAR([Date])=2022 && ([Account] in {"A" ,"C"})))
The final show:
Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Vegas95 Try this dax to create a measure :
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
Check out the February 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 50 | |
| 49 | |
| 35 | |
| 15 | |
| 14 |
| User | Count |
|---|---|
| 92 | |
| 75 | |
| 41 | |
| 26 | |
| 25 |