Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
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 🙂
Check out the September 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
114 | |
95 | |
90 | |
35 | |
35 |
User | Count |
---|---|
154 | |
102 | |
82 | |
64 | |
54 |