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.
Hello. I have a measure that is using an if statement for the result by month. I need a running sum of that monthly column
Solved! Go to Solution.
Hi @MKatsanevas
First, create the month column in numeric form.
To calculate the running total for another measure then just add that measure code ( if block ) into your running total code.
example code :
Monthly Comm running sum =
VAR month = MAX(Transactions[Fiscal Month])
VAR result = CALCULATE(
[MonthlyCommEarnedCalc],// OR Put if condtion measure code here
Transactions[Fiscal Month] <= month,
ALLSELECTED(Transactions)
)
Return result
check this tutorial :
https://www.youtube.com/watch?v=4gf3eueRD_g
Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @MKatsanevas
First, create the month column in numeric form.
To calculate the running total for another measure then just add that measure code ( if block ) into your running total code.
example code :
Monthly Comm running sum =
VAR month = MAX(Transactions[Fiscal Month])
VAR result = CALCULATE(
[MonthlyCommEarnedCalc],// OR Put if condtion measure code here
Transactions[Fiscal Month] <= month,
ALLSELECTED(Transactions)
)
Return result
check this tutorial :
https://www.youtube.com/watch?v=4gf3eueRD_g
Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thanks. Im new to Dax and im not sure exactly how to proceed.
@MKatsanevas What happens if you change your ALLSELECTED to ALL?
@MKatsanevas This looks like a measure aggregation problem. See my blog article about that here: https://community.powerbi.com/t5/Community-Blog/Design-Pattern-Groups-and-Super-Groups/ba-p/138149
The pattern is:
MinScoreMeasure = MINX ( SUMMARIZE ( Table, Table[Group] , "Measure",[YourMeasure] ), [Measure])
MaxScoreMeasure = MAXX ( SUMMARIZE ( Table, Table[Group] , "Measure",[YourMeasure] ), [Measure])
SumScoreMeasure = SUMX ( SUMMARIZE ( Table, Table[Group] , "Measure",[YourMeasure] ), [Measure])
etc.
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 |
---|---|
13 | |
2 | |
2 | |
1 | |
1 |
User | Count |
---|---|
20 | |
3 | |
2 | |
2 | |
2 |