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 all,
I’m trying to create a measure that will calculate the same number for each row in the pivot. The measure will be used as the denominator for an allocation ratio. The measure should be sum of CATEGORY1 and CATEGORY2 revenue for each COMPANY CODE.
DATA is my fact table that has company codes, accounts, and amounts (among other things).
Revenue Measure = CALCULATE(sum(DATA'[Amount]),'DATA'[Account]="Revenue Account Code")
Revenue Allocation Key Denominator =
if([Revenue Measure]=0,BLANK(),
CALCULATE(sum('DATA'[Amount]),
ALLEXCEPT('DATA','DATA'[COMPANY CODE]),
'DATA'[Account]="Revenue Account Code",
'DATA'[CATEGORY]="CATEGORY1"||'DATA'[CATEGORY]="CATEGORY2"))
Desired output:
The formula above works, but it populates the value for all categories (which is fine, since the numerator is zero for those rows). I have two questions:
Many thanks for your help!!!
Hi @jkapso751
please try
Revenue Allocation Key Denominator =
CALCULATE (
SUM ( 'DATA'[Amount] ),
ALLEXCEPT ( 'DATA', 'DATA'[COMPANY CODE] ),
'DATA'[Account] = "Revenue Account Code",
KEEPFILTERS ( 'DATA'[CATEGORY] IN { "CATEGORY1", "CATEGORY2" } )
)
Thanks tamerj1. Tried the formula, but the measure is still populating all the rows in the table including the ones with no revenue.
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 | |
| 5 | |
| 4 |
| User | Count |
|---|---|
| 27 | |
| 22 | |
| 20 | |
| 17 | |
| 12 |