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 moreGet certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register 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 🙂
Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
User | Count |
---|---|
90 | |
88 | |
83 | |
64 | |
49 |
User | Count |
---|---|
127 | |
108 | |
87 | |
70 | |
66 |