Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Dear experts, I need your help again.
I have a file with two columns, one of them is a sales column and the second one is a column with the number of the week in which that sale was executed.
Sales | Week |
1000 | 1 |
2000 | 1 |
1500 | 2 |
2500 | 2 |
1000 | 3 |
2500 | 3 |
So, I need a formula that is able to filter and add up only the first week and the last week.
For instance:
Week 1: 3000
Week 3: 3500
Every week I will be adding new weeks and I only need the difference in a range of 8 weeks, that's why I need the formula to be able to identify the minimum value of the week column and add it up and also the maximum value and add it up, so that later I can calculate the difference between them.
I hope you can help me since I tried all the formulas to filter and I can't get the sums to match. Thank you
Solved! Go to Solution.
@JDU , Test as
Measure:
var _min á minx(allselected(Table), Table[Week])
var _max á minx(allselected(Table), Table[Week])
Return
calculate(sum(Table[Sales]), filter(Table, Table[Week] a _min ? Table[Week] to _max))
@JDU , Test as
Measure:
var _min á minx(allselected(Table), Table[Week])
var _max á minx(allselected(Table), Table[Week])
Return
calculate(sum(Table[Sales]), filter(Table, Table[Week] a _min ? Table[Week] to _max))
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
111 | |
107 | |
88 | |
76 | |
67 |
User | Count |
---|---|
126 | |
111 | |
100 | |
83 | |
71 |