Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreShape the future of the Fabric Community! Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions. Take survey.
Hi,
I have a SQL Query like this:
SalebyInvoice = Sum ( Sales ) OVER ( Partition by Invoice order by SaleDate ASC )
How can I convert this to DAX?
Thanks
Solved! Go to Solution.
HI @Harry_Tran
Please try:
Sum Over=
CALCULATE(
SUM(SalesTable[ValueColumn]),
ALL(SalesTable[InvoiceOrder]),
ALL(SalesTable[SaleDate])
)
If this does not help can you please sind some more info like data model and the result you intend to have in Power BI?
@Harry_Tran Forgot a bracket and had to update the formula.
Best regards
Michael
Best regards
Michael
-----------------------------------------------------
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Appreciate your thumbs up!
@ me in replies or I'll lose your thread.
-----------------------------------------------------
Hi @Harry_Tran
Please see below an example with two categroy fields
Best regards
Michael
-----------------------------------------------------
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Appreciate your thumbs up!
@ me in replies or I'll lose your thread.
-----------------------------------------------------
HI @Harry_Tran
Please try:
Sum Over=
CALCULATE(
SUM(SalesTable[ValueColumn]),
ALL(SalesTable[InvoiceOrder]),
ALL(SalesTable[SaleDate])
)
If this does not help can you please sind some more info like data model and the result you intend to have in Power BI?
@Harry_Tran Forgot a bracket and had to update the formula.
Best regards
Michael
Best regards
Michael
-----------------------------------------------------
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Appreciate your thumbs up!
@ me in replies or I'll lose your thread.
-----------------------------------------------------
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Check out the November 2024 Power BI update to learn about new features.
User | Count |
---|---|
94 | |
90 | |
83 | |
75 | |
49 |
User | Count |
---|---|
145 | |
140 | |
109 | |
68 | |
55 |