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.
I have a table that has each month and each week and is calculating an average. I was trying to unsuccessfully add the previous week's number successively for each week each month. For example, the first week in October has 2.79. The second week should be 2.79+1.51=4.3. The third week in October should be 4.3+1.99=6.29, and so on and so on, repeating of course for each month (week 1). How would I be able to add either a calculated column or measure to be able to do that?
Solved! Go to Solution.
@ninos-shiba I would not head down the Previous Value route as it leads to sadness and despair. Previous Value aka "Recursion" - Microsoft Power BI Community. Unless it is Power Query and then it is just difficult. In your case, you could do something like:
Measure =
VAR __MonthStart = MAX('Table'[Month Start])
VAR __weekinmonth = MAX('Table'[weekinmonth])
VAR __Table = FILTER(ALL('Table'),[Month Start] = __MonthStart && [weekinmonth]<=__weekinmonth)
RETURN
SUMX(__Table,[Evals per Rep])
@ninos-shiba I would not head down the Previous Value route as it leads to sadness and despair. Previous Value aka "Recursion" - Microsoft Power BI Community. Unless it is Power Query and then it is just difficult. In your case, you could do something like:
Measure =
VAR __MonthStart = MAX('Table'[Month Start])
VAR __weekinmonth = MAX('Table'[weekinmonth])
VAR __Table = FILTER(ALL('Table'),[Month Start] = __MonthStart && [weekinmonth]<=__weekinmonth)
RETURN
SUMX(__Table,[Evals per Rep])
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 |
---|---|
110 | |
99 | |
80 | |
64 | |
57 |
User | Count |
---|---|
145 | |
110 | |
91 | |
84 | |
66 |