This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreLevel up your Power BI skills this month - build one visual each week and tell better stories with data! Get started
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 is created. i need to populate customer's itemized statement in PBI. I have all the details required in sales invoice except GST and PST. In the sales, tax is total whereas tax is split in two lines under GL 271000 and 274000 in the ledger table. when I create a basic measure and/or column for GST and PST, the visual is bringing the GST for all the transaction. but I want ot display the GST and PSt only for the tax impacted line item. my table is as below.
in the above, total tax is applicable only on 1 line item. how do I populate the GST and PST only to those lines.
my measures are
Solved! Go to Solution.
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.
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.
Check out the April 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 3 | |
| 3 | |
| 3 | |
| 2 | |
| 2 |
| User | Count |
|---|---|
| 7 | |
| 6 | |
| 6 | |
| 5 | |
| 5 |