Forum Discussion
Divide two measures when Date Matches
Hi,
I am using an excel file that has the following columns activation date, feature ID, Tenant Ids(not shown in the below picture). I have calculated the Running total per category (Parent, Child1, Child 2) using DAX Formula:
1 Reply
- Nathaniel_CCommunity Champion
Current = var _currentquarter = table[activation quarter] //do your calcs where the rows have Feature Id = Parent, and table[activation quarter] = _currentquarter.
var _calc = CALCULATE(MAX(table[Running Total]), table [Feature ID] = "Parent", table[activation quarter] = _currentquarter) return _calcHi SS12 ,
Don't know if you have used var yet, but very useful in situations like this. You will always have to have a return. Var stands for variable.
So, in this situation you are on the row with the child, the var grabs that rows activation quarter. Now we can use it to filter the table where the Feature ID = Parent, so that brings it down to 3 rows, and then where activation quarter = _currentquarter, which brings it down to 1 row in your example, then return the value of the running total.As I don't have your pbix, can't swear to the measure, but this should help.
Let me know if you have any questions.
If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos are nice too.
Nathaniel