Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
I have this table, labeled 'BILLINGMATERIALITEM', and I want to sum the 'Total' column only if the 'BillingItemTypeID' column is equal to 33. I tried to do a new measure with the formula if(column = 33, then sum column'Total') but I got an error that said I have to many values that are 33 in the BillingItemTypeID column. There are other values in that column, but all I need is the sum for value 33 and put it in a table on Power BI
Solved! Go to Solution.
Total Supplemental = calculate(sum('BILLINGMATERIALITEM'[Total]),filter('BILLINGMATERIALITEM',('BILLINGMATERIALITEM'[BillingItemTypeId])=33))
Changing it to this got it work. Thank you!
with if you need to add agg func with your expression. try this instead
TotalForBillingItem33 =
CALCULATE(
SUM('BILLINGMATERIALITEM'[Total]),
FILTER(
ALL('BILLINGMATERIALITEM'),
'BILLINGMATERIALITEM'[BillingItemTypeID] = 33
)
)
Proud to be a Super User!
Yes, this definetly helped! however, I have it in a table where it is getting sorted by the 'Billing ID' column. When I put it in that tabel it just shows me the total sum. Is there any way you can get it so it sorts by the 'Billing ID' column? Thanks!
Total Supplemental = calculate(sum('BILLINGMATERIALITEM'[Total]),filter('BILLINGMATERIALITEM',('BILLINGMATERIALITEM'[BillingItemTypeId])=33))
Changing it to this got it work. Thank you!
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
15 | |
12 | |
8 | |
8 | |
7 |
User | Count |
---|---|
15 | |
13 | |
9 | |
7 | |
6 |