Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and a 50 percent discount on exams.
Get startedEarn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
I have a column with the week number and another with the number of sales per week:
Week W7 is the current week and weeks W8 and W9 are the next weeks.
week | Sales
------------------
W1 | 12
W2 | 11
W3 | 19
W4 | 1
W5 | 2
W6 | 112
W7 | 16
W8 | 0
W9 |
And I wanted to have a measure that would return me.
week | New Column
----------------------------
W1 | 16
W2 | 16
W3 | 16
W4 | 16
W5 | 16
W6 | 16
W7 | 16
W8 | 16
W9 | 16
or this would also be worth it:
week | New Column
----------------------------
W7 | 16
W8 | 16
W9 | 16
Thanks a lot
Solved! Go to Solution.
new column =
var _max = maxX(filter(Table, [Sales] >0 && not(isblank([Sales]))),[Week])
return
sumx(filter(Table, [Week] =_max),[Sales])
new column =
var _max = maxX(filter(Table, [Sales] >0 && not(isblank([Sales]))),[Week])
return
sumx(filter(Table, [Week] =_max),[Sales])
Thank you for your reply.
I have tried it and it returns the following:
week | New column
-----------------------------
W1 | 12
W2 | 11
W3 | 19
W4 | 1
W5 | 2
W6 | 112
W7 | 16
W8 |
W9 |
@Syndicate_Admin , check this file
I don't understand why it doesn't come out makes me a total.
my Sales Column is a calculated column, I don't know if it can be affected by that.