Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
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 ) )
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
81 | |
76 | |
61 | |
37 | |
33 |
User | Count |
---|---|
99 | |
56 | |
51 | |
42 | |
40 |