Forum Discussion
How to compute GL Expense average 12 month amount ?
- 5 years ago
Hi admin11 ,
Try the following formula:
avg = var _table = FILTER( 'Date', NOT(ISBLANK([AMOUNT])) ) var _Date = MAXX(_table,'Date'[Date]) var _First = EOMONTH( _Date, -12 ) return -DIVIDE( CALCULATE( [AMOUNT], FILTER( _table, 'Date'[Date] > _First ) ), 12 )If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
WinnizIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- 5 years ago
Hi admin11 ,
Try to modify the measure Amount to the following formula:
AMOUNT = CALCULATE( SUM(GL[AMT])*-1, FILTER( GL, GL[1_EXP]="EXP" ) )Best Regards,
Winniz
Hi admin11 ,
Try the following formula:
avg =
var _table =
FILTER(
'Date',
NOT(ISBLANK([AMOUNT]))
)
var _Date = MAXX(_table,'Date'[Date])
var _First = EOMONTH( _Date, -12 )
return
-DIVIDE(
CALCULATE(
[AMOUNT],
FILTER(
_table,
'Date'[Date] > _First
)
),
12
)If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- v-kkf-msft5 years ago
Community Support
Hi admin11 ,
Try to modify the measure Amount to the following formula:
AMOUNT = CALCULATE( SUM(GL[AMT])*-1, FILTER( GL, GL[1_EXP]="EXP" ) )Best Regards,
Winniz - admin115 years ago
Memorable Member
For the above avg expression which is working fine . now i need to make use of filter panel , to filter to set 1_EXP=EXP.
1_EXP =SWITCH(TRUE(),'GL'[Reporting Code]>=00100 &&'GL'[Reporting Code]<=00375,"EXP",BLANK())Can you pls help me insert 1_EXP to avg expression , so that i don't require do additional step , it will display avg exp amount for Exp.I have already try use filter panel , it work fine. But i Tab have initial seletion button , it will cause filter panel setting not work.See image below :-Paul - admin115 years ago
Memorable Member
v-kkf-msft wow you are very intelligent.