Konigsfeldt
New Member
- Joined
- Jun 17, 2020
- Messages
- 13
- Office Version
- 365
- Platform
- Windows
Hi,
I have the following table with GL Accounts, called "ALL NRG$G_L Account"
I want to add a calculated column "Sum Amount" that calculates the sum of GL Entries from one or several GL accounts in another table, depending on the value in column "Account Type" and "Totalling".
If "Account type" =
0 = Regular account --> Sum of same G_L Account No_ from Table ALL NRG$G_L Entry$VSIFT$4
1 = Header 1 -->Do nothing/insert blank
2 = Sum Account --> SUM of all "G_L Account No_" in interval “Totalling” from Table ALL NRG$G_L Entry$VSIFT$4
3 = Header 2 -->Do nothing/insert blank
4 = Sum Account --> SUM of all "G_L Account No_" in interval “Totalling” from Table ALL NRG$G_L Entry$VSIFT$4
The GL Entry table is called "ALL NRG$G_L Entry$VSIFT$4"
I'm not very familier with DAX, I tried something like this (see below, returned ERROR) but ended with giving up and posting my issue here.
= IF('ALL NRG$G_L Account'[Account Type]=3,0,
IF('ALL NRG$G_L Account'[Totaling]<>"",SUMX(FILTER('ALL NRG$G_L Entry$VSIFT$4',AND('ALL NRG$G_L Entry$VSIFT$4'[G_L Account No_]>LEFT('ALL NRG$G_L Account'[Totaling],4)*1,RIGHT('ALL NRG$G_L Account'[Totaling],4)*1)),'ALL NRG$G_L Entry$VSIFT$4'[SUM$Amount]),SUMX(FILTER('ALL NRG$G_L Entry$VSIFT$4','ALL NRG$G_L Entry$VSIFT$4'[G_L Account No_]='ALL NRG$G_L Account'[No_]),'ALL NRG$G_L Entry$VSIFT$4'[SUM$Amount])))
Could anybody help me with this? I hope I explained myself, otherwise please ask and I'll do my best to further explain.
Cheers
I have the following table with GL Accounts, called "ALL NRG$G_L Account"
I want to add a calculated column "Sum Amount" that calculates the sum of GL Entries from one or several GL accounts in another table, depending on the value in column "Account Type" and "Totalling".
If "Account type" =
0 = Regular account --> Sum of same G_L Account No_ from Table ALL NRG$G_L Entry$VSIFT$4
1 = Header 1 -->Do nothing/insert blank
2 = Sum Account --> SUM of all "G_L Account No_" in interval “Totalling” from Table ALL NRG$G_L Entry$VSIFT$4
3 = Header 2 -->Do nothing/insert blank
4 = Sum Account --> SUM of all "G_L Account No_" in interval “Totalling” from Table ALL NRG$G_L Entry$VSIFT$4
The GL Entry table is called "ALL NRG$G_L Entry$VSIFT$4"
I'm not very familier with DAX, I tried something like this (see below, returned ERROR) but ended with giving up and posting my issue here.
= IF('ALL NRG$G_L Account'[Account Type]=3,0,
IF('ALL NRG$G_L Account'[Totaling]<>"",SUMX(FILTER('ALL NRG$G_L Entry$VSIFT$4',AND('ALL NRG$G_L Entry$VSIFT$4'[G_L Account No_]>LEFT('ALL NRG$G_L Account'[Totaling],4)*1,RIGHT('ALL NRG$G_L Account'[Totaling],4)*1)),'ALL NRG$G_L Entry$VSIFT$4'[SUM$Amount]),SUMX(FILTER('ALL NRG$G_L Entry$VSIFT$4','ALL NRG$G_L Entry$VSIFT$4'[G_L Account No_]='ALL NRG$G_L Account'[No_]),'ALL NRG$G_L Entry$VSIFT$4'[SUM$Amount])))
Could anybody help me with this? I hope I explained myself, otherwise please ask and I'll do my best to further explain.
Cheers