Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
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 |
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.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.