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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Report builder : total of several SUM from several datasets

Hello everybody,

 

My problem and request are for REPORT BUILDER.

In order to do a total of several SUM from several datasets,  I have 2 requests :

1- How to call an already created textbox (textebox32) in another Text Zone ? 

I tried this, but it doens't work : =Fields!Textebox32.Value 

I also tried this : =Fields!Textebox32.Value, "dataset1"

2- I want to do the total of several SUM from several datasets, how to do ?

I have 3 sums, and i want to do a total : 

sum(Fields!deduction_1.Value, "Dts_dataset1")

sum(Fields!deduction_2.Value, "Dts_dataset2")

sum(Fields!deduction_3.Value, "Dts_dataset3")

 

I think if I can call the 3 textboxes (my first request), then I could do the sum ?

Thanks everybody 🙂

1 ACCEPTED SOLUTION
d_gosbell
Super User
Super User


@Anonymous wrote:

Hello everybody,

 

My problem and request are for REPORT BUILDER.

In order to do a total of several SUM from several datasets,  I have 2 requests :

1- How to call an already created textbox (textebox32) in another Text Zone ? 

I tried this, but it doens't work : =Fields!Textebox32.Value 

I also tried this : =Fields!Textebox32.Value, "dataset1"

 


Fields refers to items in datasets, to reference a text box you would use the ReportItems collection

 

eg.   ReportItems!Textebox32.Value

 

So you should be able to do something like ReportItems!Textebox32.Value  + ReportItems!Textebox33.Value

 

Note, you can rename textboxes. If I am going to reference a text box in another expression I will usually rename it to something like txtTotalSales and txtTotalTax - it makes it much easier to understand what you were doing if you have to come back later and alter the report when you read:

    ReportItems!txtTotalSales.Value  + ReportItems!txtTotalTax.Value

 

instead of something like:

    ReportItems!Textebox32.Value  + ReportItems!Textebox33.Value

View solution in original post

1 REPLY 1
d_gosbell
Super User
Super User


@Anonymous wrote:

Hello everybody,

 

My problem and request are for REPORT BUILDER.

In order to do a total of several SUM from several datasets,  I have 2 requests :

1- How to call an already created textbox (textebox32) in another Text Zone ? 

I tried this, but it doens't work : =Fields!Textebox32.Value 

I also tried this : =Fields!Textebox32.Value, "dataset1"

 


Fields refers to items in datasets, to reference a text box you would use the ReportItems collection

 

eg.   ReportItems!Textebox32.Value

 

So you should be able to do something like ReportItems!Textebox32.Value  + ReportItems!Textebox33.Value

 

Note, you can rename textboxes. If I am going to reference a text box in another expression I will usually rename it to something like txtTotalSales and txtTotalTax - it makes it much easier to understand what you were doing if you have to come back later and alter the report when you read:

    ReportItems!txtTotalSales.Value  + ReportItems!txtTotalTax.Value

 

instead of something like:

    ReportItems!Textebox32.Value  + ReportItems!Textebox33.Value

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.