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!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Any1 know what's wrong with below DAX?
2017Exp = calculate(sum(XeroMasterExport[ActualExp]),XeroMasterExport[Date]=2017)
Solved! Go to Solution.
Yes you need to use the YEAR function
2017Exp =
CALCULATE (
SUM ( XeroMasterExport[ActualExp] ),
YEAR ( XeroMasterExport[Date] ) = 2017
)HTH! ![]()
EDIT: Well you may need to use this instead if you are using any slicers that cause the above to give you blank
2017Exp =
CALCULATE (
SUM ( XeroMasterExport[ActualExp] ),
FILTER ( ALL ( XeroMasterExport ), YEAR ( XeroMasterExport[Date] ) = 2017 )
)
Yes you need to use the YEAR function
2017Exp =
CALCULATE (
SUM ( XeroMasterExport[ActualExp] ),
YEAR ( XeroMasterExport[Date] ) = 2017
)HTH! ![]()
EDIT: Well you may need to use this instead if you are using any slicers that cause the above to give you blank
2017Exp =
CALCULATE (
SUM ( XeroMasterExport[ActualExp] ),
FILTER ( ALL ( XeroMasterExport ), YEAR ( XeroMasterExport[Date] ) = 2017 )
)
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 46 | |
| 42 | |
| 34 | |
| 31 | |
| 21 |
| User | Count |
|---|---|
| 143 | |
| 125 | |
| 100 | |
| 81 | |
| 63 |