Forum Discussion
Sum by Maximum Month
Good day
I have created the following measures
Expenditure = CALCULATE(sum(Balance[Balance]), Balance[Account Type] = "Expenditure") ~ this gives me sum of the balance where account type is equal to Expenditure
Highest Expenditure = CALCULATE(max(Balance[Balance]), Balance[Account Type] = "Expenditure") ~ this gives me the max balance of expenditure
Highest Expenditure Month = LOOKUPVALUE(Balance[Bookkeeping Month],Balance[Balance],[Highest Expenditure]) ~ this gives me the month in which the highest expenditure happened
What I want to do is create a measure ~ to sum the all the balance if it is Expenditure and in the Highest Month
Thank you
You can try this measure and show the result in Card visual.
HighMonthSum = VAR HighestMonth = [Highest Expenditure Month] RETURN CALCULATE ( [Expenditure], FILTER ( Balance, Balance[bookkeeping month] = HighestMonth ) )Best Regards,
Herbert
3 Replies
- CorleenRegular Visitor
Good day
I have the following measures
Expenditure = CALCULATE(sum(Balance[Balance]), Balance[Account Type] = "Expenditure") ~ this sums all the balance values where account type is equal to Expenditure
Highest Expenditure = CALCULATE(max(Balance[Balance]), Balance[Account Type] = "Expenditure") ~ this gives me the maximum balance where account type = Expenditure
Highest Expenditure Month = LOOKUPVALUE(Balance[Bookkeeping Month],lBalance[Balance],[Highest Expenditure]) ~ this gives me the month (201509) which have the highest Expenditure
I want to create a measure that sums the Balance's for Expenditure and is in the Highest Expenditure Month
Thank you
- v-haibl-msftMicrosoft Employee
You can try this measure and show the result in Card visual.
HighMonthSum = VAR HighestMonth = [Highest Expenditure Month] RETURN CALCULATE ( [Expenditure], FILTER ( Balance, Balance[bookkeeping month] = HighestMonth ) )Best Regards,
Herbert- CorleenRegular Visitor
Yes I want to put it in a Card Visual
Works perfectly
Thank you