Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
hello all,
how do I write a DAX expression that is equivalent to the following SQL statement:
select YEAR(myDATE), SUM(myAMOUNT)
from myTABLE
group by YEAR(myDATE)
order by YEAR(myDATE)
The result is the sum of myAMOUNT by Year:
Year myAMOUNT
2019 120
2020 150
2021 110
2022 160
Thanks,
vrv
Solved! Go to Solution.
Hello @vrv ,
so what you need is a dax measure that sums the amount
Myamount = sum(tablename[myamount])
then you display this measure alongside with the year dimension and you would be able to see the values as you want.
If I answered your question, please mark my post as solution, Appreciate your Kudos 👍
Proud to be a Super User! | |
Idrisshatila,
thank you for your reply.
If I were to need the sum of Amount of only some records that have some flag field set on 1, how would the DAX expression change?
Hello @vrv ,
so what you need is a dax measure that sums the amount
Myamount = sum(tablename[myamount])
then you display this measure alongside with the year dimension and you would be able to see the values as you want.
If I answered your question, please mark my post as solution, Appreciate your Kudos 👍
Proud to be a Super User! | |
Idrisshatila,
thank you for your reply.
If I were to need the sum of Amount of only some records that have some flag field set on 1, how would the DAX expression change?
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
104 | |
69 | |
49 | |
41 | |
34 |
User | Count |
---|---|
164 | |
111 | |
61 | |
53 | |
38 |