Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
Aartibhilare
Helper III
Helper III

Sum of Column based on another column in pagnited report

 

Hi Team,

I have grouped the data at the EmployeeNumber level, and I have the transaction code and its value in separate columns.

However, when I try to run the following expression to sum the transaction amounts for records where the transaction type is "NRT":

 
=Sum(IIf(Fields!TxnTypeCode.Value = "NRT", Fields!TxnAmount.Value, 0), "EmployeeNumber"
 

I am encountering an error in the report.

Aartibhilare_0-1740357469333.png

 

Aartibhilare_2-1740357674300.png

 

 

 

below is database

Aartibhilare_1-1740357575040.png

 

3 REPLIES 3
Ashish_Mathur
Super User
Super User

Hi,

Not sure what you are trying to do but try this measure

Measure = calculate(sum(Fields!TxnAmount.Value),Fields!TxnTypeCode.Value="NRT")

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Aartibhilare
Helper III
Helper III

Hi @Anonymous 

I have tried it and it didnt work. Still facing same issue

Anonymous
Not applicable

Hi, @Aartibhilare 

 

It looks like there is a small syntax error in your expression.  Here is the corrected expression:

=Sum(IIf(Fields!TxnTypeCode.Value = "NRT", Fields!TxnAmount.Value, 0), "EmployeeNumber")

Please check if it solves your problem?

 

Best Regards,

Community Support Team _Charlotte

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors