March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
I have a table with Route numbers, Delivery numbers and Volume for each Delivery. I need to summarize Volume for each Route.
I try to do it with WINDOW function and partition by [Route No] but somehow it does not sum up the volume for a Route.
Could someone help please?
Index | Route No | Delivery No | Volume Delivery | Volume Route |
1 | a1 | a123 | 42 | 113 |
2 | a1 | a123 | 50 | 113 |
3 | a1 | a456 | 1 | 113 |
4 | a1 | a456 | 20 | 113 |
5 | b0 | b123 | 21 | 38 |
6 | b0 | b123 | 2 | 38 |
7 | b0 | b456 | 9 | 38 |
8 | b0 | b789 | 6 | 38 |
This is the code that I try:
Volume Route =
SUMX(
WINDOW(
1, ABS,
0, REL,
SUMMARIZE(ALLSELECTED(Table),
Table[Route No]
),
,
,
PARTITIONBY(Table[Route No])
),
CALCULATE(SUM(Table[Volume Delivery]))
)
Solved! Go to Solution.
I think a window function might be a bit overkill here.
Have you tried something simpler like this?
Volume Route =
CALCULATE (
SUM ( Table[Volume Delivery] ),
ALLEXCEPT ( Table, Table[Route No] )
)
You can but not necessarily use WINDOW here.
Expertise = List.Accumulate( {Days as from Today}, {Skills and Knowledge}, (Current, Everyday) => Current & Day.LeanAndPractise(Everyday) ) |
thanks a lot!!
This does what you asked for
Click here to download PBIX
I have answered the questinb you actually asked, so please do the right thing and accept the solution.
If you want somethig different then please accept this solution and raise a new question with the example input and desired output.
Please dont post your buggy dax and just expect us to know what you want. 🙄
Thanks
I think a window function might be a bit overkill here.
Have you tried something simpler like this?
Volume Route =
CALCULATE (
SUM ( Table[Volume Delivery] ),
ALLEXCEPT ( Table, Table[Route No] )
)
thank you so much! it worked nicely 🙂
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
129 | |
90 | |
75 | |
58 | |
53 |
User | Count |
---|---|
200 | |
104 | |
101 | |
67 | |
55 |