Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Get Fabric certified for FREE! Don't miss your chance! Learn more
= Sum(Fields.ADDTL_INST + Fields.ADDTL_REF + Fields.EXCISE_TAX + Fields.NON_STANDARD_FEES + Fields.RECORDING_FEES + Fields.EXC_ENT + Fields.UCC_FEES + Fields.UAP_FEES) - Sum(Fields.UCC_FEES) - Sum(Fields.EXCISE_TAX) - Sum(Fields.NON_STANDARD_FEES) - SUM(iif((Fields.ADDTL_INST > 0 Or Fields.ADDTL_REF > 0 Or Fields.EXCISE_TAX > 0 Or Fields.RECORDING_FEES > 0 Or Fields.NON_STANDARD_FEES > 0) AND Fields.DT_DESC = "D - T", (Fields.ADDTL_INST + Fields.ADDTL_REF + Fields.EXCISE_TAX + Fields.NON_STANDARD_FEES + Fields.RECORDING_FEES + Fields.EXC_ENT), 0.00)) - COUNT(iif((Fields.ADDTL_INST > 0 Or Fields.ADDTL_REF > 0 Or Fields.EXCISE_TAX > 0 Or Fields.RECORDING_FEES > 0 Or Fields.NON_STANDARD_FEES > 0 Or Fields.UCC_FEES > 0) AND (Fields.DT_DESC = "DEED" OR Fields.DT_DESC = "EASMT" OR Fields.DT_DESC = "SEE INSTRUMENT"), 1, null)) * 6.2
Your original query was using a lot of OR statements. Try replacing statements like:
I would split the sub CALCULATATES into their own measures, the write the Fee measure to add the sub measures together.
Also, in the first part of the query it looks like three of the fields you are adding together you are taking back out right afterwards.
Can you just leave those 3 out of the first sum?
For the last 6 steps, the ones that multipl a count by 6.2, looking at the sql I think you can just do that this way.
6.2 measure =
CALCULATE(
COUNTROWS(Query1),
KEEPFILTERS(Query1[DT_DESC] IN {"DEED","EASMT","SEE INSTRUMENT"}),
(Query1[ADDTL_INST] > 0 || Query1[ADDTL_REF] > 0 || Query1[EXCISE_TAX] > 0 || Query1[RECORDING_FEES] > 0 || Query1[NON_STANDARD_FEES] > 0 || Query1[UCC_FEES] > 0)
) * 6.2
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
Check out the February 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 68 | |
| 59 | |
| 48 | |
| 20 | |
| 16 |
| User | Count |
|---|---|
| 107 | |
| 106 | |
| 39 | |
| 27 | |
| 27 |