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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

Visualization Summary

Hello Community,

 

   I am a new PowerBI user. I have a table visualization with fields from three tables. I have verified that the results displayed are correct. I now want to count the number of entries, and do a sum on the currency field. When I try to use the sum function on the currency field; it will add all of the values in the table, not just the values in the visual. The same thing happens when I try to do a count. Any ideas why this is happening?

 

Sincerely,

 

Peter

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous ,

 

If i understand you correctly, ALLSELECT() function might be helpful for you.

Please refer to the measures below and modify your measures.

sum = CALCULATE(SUM('Table'[PotentialValue]),ALLSELECTED('Table'))
count = CALCULATE(COUNT('Table'[ID]),ALLSELECTED('Table'))

Result would be shown as below.

1.PNG

BTW, since the filters you used are visual level filter, they can't affect other views such as SUM and COUNT above.

Instead, you can use page level filter if you want.

2.PNG

 

Best Regards,

Jay

Community Support Team _ Jay Wang

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

View solution in original post

8 REPLIES 8
Anonymous
Not applicable

Hi @Anonymous ,

 

If i understand you correctly, ALLSELECT() function might be helpful for you.

Please refer to the measures below and modify your measures.

sum = CALCULATE(SUM('Table'[PotentialValue]),ALLSELECTED('Table'))
count = CALCULATE(COUNT('Table'[ID]),ALLSELECTED('Table'))

Result would be shown as below.

1.PNG

BTW, since the filters you used are visual level filter, they can't affect other views such as SUM and COUNT above.

Instead, you can use page level filter if you want.

2.PNG

 

Best Regards,

Jay

Community Support Team _ Jay Wang

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

az38
Community Champion
Community Champion

Hi @Anonymous 

are you doing it as measure and inside the "calculate" container?

for example

Measure = calculate(sum([currency]))

do not hesitate to give a kudo to useful posts and mark solutions as solution

 


do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn
Anonymous
Not applicable

Hello,

 

   Thank you for the quick reply. I am using the desktop client, to create a report and have imported the three tables. As I create the report, with the visual highlighted: I go to the fields list and select the 'down' ceveron and select the summary function I want to use (count on the ID field, or sum on the AnnualSales field. 

 

Sincerely,

 

Peter

az38
Community Champion
Community Champion

@Anonymous 

try go to the Fileds pane, right click to you table and New Measure

Measure = calculate(sum([currency]))

then add your Measure to the visual and set Do not aggregate in Vizualization pane

this technique is enable you a "row-context"and should give you a value in accordance with other column in the each row

do not hesitate to give a kudo to useful posts and mark solutions as solution

LinkedIn


do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn
Anonymous
Not applicable

Hi,

 

   I thought this would help in the explination. Below is an image of my table visualization while in Report view on the desktop client. I want to count the number of values in the Handoff column, and sum the values in the PotentialValue column.

image2.jpg

 

So I want to see the number 7 for the count, and 150,000 for the value.

 

Thanks,

 

Peter

az38
Community Champion
Community Champion

@Anonymous 

create 2 new measures

1.

MeasureCount = calculate(count([Handoff ]);ALL('Table'))

and

MeasureSum = calculate(sum([PotentialValue]);ALL('table'))

then add this measures to table visual and set Do not aggregate

do not hesitate to give a kudo to useful posts and mark solutions as solution

LinkedIn


do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn
Anonymous
Not applicable

Hi,

 

   I tried your suggestion. I was unable to use the syntax you provided in its entirety. The ;ALL('Table') did not work for me. I did create the measure in the image below and added it to my table.

 

image2.jpg

 

It qadded a new column with the number 1 for each row and added each row to my results, thus I have a total of 1741 rather than the 7 I need. What I would like to do is just be able to count the returned results. Using my prior image, I would like the Total to appear at the bottom with the number 7 under Handoff and 125,000 under the Potental Value column.

 

Peter

az38
Community Champion
Community Champion

@Anonymous 

what do you mean "The ;ALL('Table') did not work for me"?what kind error do you see?try to replace ";"to ",". it depends on localization

and why count should be 7 if i see scrollbar and 8 ros as minimum in visual

you could share your pbix-file to https://uploadfiles.io/ for example

do not hesitate to give a kudo to useful posts and mark solutions as solution


do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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