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.
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 🙂
User | Count |
---|---|
93 | |
92 | |
85 | |
83 | |
49 |
User | Count |
---|---|
150 | |
142 | |
112 | |
73 | |
55 |