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 during Fabric Data Days. Don't miss your chance! Request now
Hi. Team. I need your help on this. I have to make a report before the end of the month.
From this table:
To this outcome:
Hope this can help. TIA
@Anonymous,
Here's a solution based on my understanding of the requirements:
1. Orig Amount in the table visual is the sum of Orig Amount where Doc Code Sign = Y.
2. Audited Amt in the table visual is calculated as follows:
a. Count the number of rows for each Doc Code.
b. If count = 1, then sum Audited Amt.
c. If count > 1, then sum Audited Amt where Doc Code Sign <> Y.
Solution:
1. Create three measures. The second measure is used for calculation only; it is not displayed in the table visual.
Total Orig Amount = CALCULATE ( SUM ( Docs[Orig Amount] ), Docs[Doc Code Sign] = "Y" )
Audited Amount Calc =
VAR vAuditAmt =
SUM ( Docs[Audited Amt] )
VAR vCurDocCode =
MAX ( Docs[Doc Code] )
VAR vCurDocCodeRows =
FILTER ( ALL ( Docs ), Docs[Doc Code] = vCurDocCode )
VAR vCountDocCode =
COUNTROWS ( vCurDocCodeRows )
VAR vRowsToSum =
FILTER ( vCurDocCodeRows, Docs[Doc Code Sign] <> "Y" )
VAR vResult =
IF ( vCountDocCode = 1, vAuditAmt, SUMX ( vRowsToSum, Docs[Audited Amt] ) )
RETURN
vResult
Total Audited Amount =
--this measure is necessary in order to properly calculate totals
VAR vDocCodeTable =
ADDCOLUMNS (
SUMMARIZE ( Docs, Docs[Doc Code] ),
"AuditedAmountCalc", [Audited Amount Calc]
)
VAR vResult =
SUMX ( vDocCodeTable, [AuditedAmountCalc] )
RETURN
vResult
2. Create a table visual and filter Doc Code Sign = Y.
Proud to be a Super User!
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 11 | |
| 9 | |
| 9 | |
| 6 | |
| 5 |
| User | Count |
|---|---|
| 27 | |
| 22 | |
| 20 | |
| 17 | |
| 12 |