Forum Discussion
Sreerams26
1 year agoFrequent Visitor
Need help on DAX
I have two tables - Sales Invoice Lines containing sales transaction and Ledger table containing all financial accounting entries. Both these tables have voucher as common item and hence a relation ...
- Anonymous1 year ago
Hi Sreerams26 ,
Please try the following measures:
GST_Conditional = IF( SELECTEDVALUE('Sales Invoice Lines'[TotalTax]) > 0, CALCULATE(SUM('TAX Entries'[TRANSACTIONCURRENCYAMOUNT]), FILTER('TAX Entries', 'TAX Entries'[MAINACCOUNTID] = "271000" && SELECTEDVALUE('Sales Invoice Lines'[Voucher]) = 'TAX Entries'[Voucher]) ), "" )PST_Conditional = IF( SELECTEDVALUE('Sales Invoice Lines'[TotalTax]) > 0, CALCULATE(SUM('TAX Entries'[TRANSACTIONCURRENCYAMOUNT]), FILTER('TAX Entries', 'TAX Entries'[MAINACCOUNTID] = "274000" && SELECTEDVALUE('Sales Invoice Lines'[Voucher])= 'TAX Entries'[Voucher]) ), "" )Result for your reference:
If this is not feasible, please feel free to reply!
Best regards,
Joyce
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
1 year agoNot applicable
Hi Sreerams26 ,
Please try the following measures:
GST_Conditional =
IF(
SELECTEDVALUE('Sales Invoice Lines'[TotalTax]) > 0,
CALCULATE(SUM('TAX Entries'[TRANSACTIONCURRENCYAMOUNT]),
FILTER('TAX Entries', 'TAX Entries'[MAINACCOUNTID] = "271000" && SELECTEDVALUE('Sales Invoice Lines'[Voucher]) = 'TAX Entries'[Voucher])
),
""
)
PST_Conditional =
IF(
SELECTEDVALUE('Sales Invoice Lines'[TotalTax]) > 0,
CALCULATE(SUM('TAX Entries'[TRANSACTIONCURRENCYAMOUNT]),
FILTER('TAX Entries', 'TAX Entries'[MAINACCOUNTID] = "274000" && SELECTEDVALUE('Sales Invoice Lines'[Voucher])= 'TAX Entries'[Voucher])
),
""
)
Result for your reference:
If this is not feasible, please feel free to reply!
Best regards,
Joyce
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.