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! Request now

Reply
BarryM
Helper II
Helper II

How to report sum of two results in separate visuals in a card?

I have 2 tables in a report. I need to sum the totals from the tables and display them in a card. I have tried to creat a measure for this but the results in the card are way off. The items I need to total are circled in red.

 

Screen shot:

report.JPG

13 REPLIES 13
bolfri
Solution Sage
Solution Sage

BarryM,

 

can you share a pbix file with dummy data to help you?





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




I have provided some data in the replies below, all of what I am using is aggregated into that one table

It will be easier for everyone if you will share a sample data to help you with that. You can receive an answer much faster than right now. You dont need to give us all the data that you have. You can prepare some dummy data to give us more what you are doing and what are you expecting. 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Unfortubately due to security restrictions I am not able to connect to a public accessable space where you could access the pbix files.

That's why I suggest to create a sample data and past them into the PBI file to show us what you have. It can be 4-6 rows only, but applying all things that you are fighting with. 🙂





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Unfortunately I have no means of getting that PBI file to you. I can't attach anything to these posts and I cannot access any file share that will allow me to uplaod any PBIX file. This is why I included a redacted version of the single table in PBI that I am using in the posts below.

Ashish_Mathur
Super User
Super User

Hi,

If the measure in both tables is the same, then just drag that to the card visual.  If not, then i will need to see the file.  Share the link from where i can download your PBI file.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
v-yueyunzh-msft
Community Support
Community Support

Hi, @BarryM 

According to your description, you want to get the sum of total in the table to show it in the card visual. Right?
You need to use the summarize() function to create a virtual table that is the same as your table, and use the addcolumns() function plus your sum measure. Then finally use the sumx() function to find total,like this:

 

var _t =ADDCOLUMNS(SUMMARIZE(ALLSELECTED(Table),'Table'[Column1 in your table],'Table'[Column2 in your table],....),"measure",[your measure])
return
SUMX(_t,[measure])

 

If this method does not meet your needs, you can provide us with your special sample data and the desired output sample data in the form of tables, so that we can better help you solve the problem.

Thank you for your time and sharing, and thank you for your support and understanding of PowerBI! 

 

Best Regards,

Aniya Zhang

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

I have tried to creat the virtual table as you suggested but it through some errors. Here is a sable of the data that I am using.

 

37663BI-453111601Financial Costing02/12/2022 16:36 11306Created12311JIRAUSER12311 DPS: 10 days x $1,250/day PS10  22/23   1One-Time137663376633738 TDRSIC46BROS-416  Threat Detection & Response Services856215ESS (Endpoint Security Services)TDRS $0.00 $1,250.00 
37664BI-453211601Financial Costing02/12/2022 16:55 11306Created12311JIRAUSER12311 D  O&M / Non-Salary1  22/23   1000One-Time137664376643738 TDRSIC46BROS-416  Threat Detection & Response Services856215ESS (Endpoint Security Services)TDRS $0.00 $4.16 
37706BI-454311601Financial Costing07/12/2022 16:15 11306Created12408JIRAUSER12408 DTesting for QTY of 2.5 FW's with Other Costs for FWCapital1  22/23   3One-Time137706377063819 Virtual Private NetworkIH43BROS-425  ISO Protective Security Services856216Virtual Private NetworkPSS $0.00 $10,000.00 
37707BI-454411601Financial Costing07/12/2022 16:22 11306Created12408JIRAUSER12408 DTesting Decimal Point for Other costs ... using VPN PSS support for certificatesO&M / Non-Salary1  22/23   100One-Time137707377073819 Virtual Private NetworkIH43BROS-425  ISO Protective Security Services856216Virtual Private NetworkPSS $0.00 $4.50 
37708BI-454511601Financial Costing07/12/2022 16:26 11306Created12408JIRAUSER12408 DTesting Flat Rate for TDRS example -- "Standard Cost of $1800.00"O&M / Salary2.59IT-03-SLR - $152,900.00IT-03-SLR22/23   1One-Time137708377083828 E&IIE53BROS-426  Security E&I839514Design for: Secure Remote Access; Network SecurityE&I $1,800.00$152,900.00$0.00$152,900
37709BI-454611601Financial Costing07/12/2022 16:35 11306Created12408JIRAUSER12408 DTEST for no entry on "Other Costs" fieldO&M / Salary1IT-02 - $86,213.00IT-0222/23   1One-Time137709377093621 Security E&IIE53BROS-403  Security E&I839411DirectorE&I $391.88$86,213.00 $86,213
37710BI-454711601Financial Costing07/12/2022 16:41 11306Created12408JIRAUSER12408 DTesting with making sure "Other Costs" has entry of "$0"O&M / Salary1IT-03-SLR - $152,900.00IT-03-SLR22/23   1One-Time137710377103621 Security E&IIE53BROS-403  Security E&I839411DirectorE&I $695.00$152,900.00$10.00$152,900
37711BI-454811601Financial Costing07/12/2022 16:43 11306Created12408JIRAUSER12408 DIn "Other Cost" field ... just leave as $ with no other value enteredO&M / Salary2IT-03-SLR - $152,900.00IT-03-SLR22/23   1One-Time137711377113621 Jeff ConradIE53BROS-403  Security E&I839411DirectorE&I $1,390.00$152,900.00$23.00$152,900
37712BI-454911601Financial Costing07/12/2022 17:06 11306Created12201JIRAUSER12201    Capital1IT-02 - $86,213.00IT-0222/23   1 137712377123828 E&IIE53BROS-426  Security E&I839514Design for: Secure Remote Access; Network SecurityE&I $391.88$86,213.00$0.00$86,213
37730BI-456711601Financial Costing08/12/2022 19:26What should be entered here???11306Created11600JIRAUSER11600 DFW-UC-2C (5 days) for GOP O&M / Salary5IT-02-SLR - $152,900.00IT-02-SLR23/24   1One-Time137730377303648 TDRSIC91BROS-406  Threat Detection & Response Services855211SIEM (Security Info & Event Mgt)TDRS $3,475.00$152,900.00$0.00$152,900
37731BI-456811601Financial Costing08/12/2022 19:26 11306Created11600JIRAUSER11600 D  Capital12  23/24   2One-Time137731377313657 Threat Detection & Response ServicesIE44BROS-407  Threat Detection & Response Services855313ETI SOC Admin InvestigationsTDRS $0.00 $5,000.00 
37732BI-456911601Financial Costing08/12/2022 19:26 11306Created11600JIRAUSER11600 DCapital Cost 2 x $ 50,000.00 Fortinet equipmentCapital1  22/23   2One-Time137732377323774 ISO Protective Security ServicesIN97BROS-420  ISO Protective Security Services856314Firewall - Zone SecurityPSS $0.00 $50,000.00 
37733BI-457011601Financial Costing08/12/2022 19:26 11306Created11600JIRAUSER11600 DSalary IT-04: 10 days O&M / Salary10IT-04 - $118,499.00IT-0422/23   1One-Time137733377333729 Threat Detection & Response ServicesIC46BROS-415  Threat Detection & Response Services856213ESS (Endpoint Security Services)TDRS $5,386.32$118,499.00$1.00$118,499
37734BI-457111601Financial Costing08/12/2022 19:26 11306Created11600JIRAUSER11600 D  O&M / Salary5IT-03-SLR - $152,900.00IT-03-SLR22/23   1On-going437734377343819 Virtual Private NetworkIH43BROS-425  ISO Protective Security Services856216Virtual Private NetworkPSS $868.75$152,900.00$1.00$38,225
37735BI-457211601Financial Costing08/12/2022 19:26 11306Created11600JIRAUSER11600 DPS: 10 days x $1,250/day PS10  22/23   1One-Time137735377353738 TDRSIC46BROS-416  Threat Detection & Response Services856215ESS (Endpoint Security Services)TDRS $0.00 $1,250.00 
37736BI-457311601Financial Costing08/12/2022 19:26 11306Created11600JIRAUSER11600 D  O&M / Non-Salary1  22/23   1000One-Time137736377363738 TDRSIC46BROS-416  Threat Detection & Response Services856215ESS (Endpoint Security Services)TDRS $0.00 $4.16 
37737BI-457411601Financial Costing08/12/2022 19:26 11306Created11600JIRAUSER11600 DCapital cost 5 X 10,000/unit Capital1  22/23   5One-Time137737377373738 TDRSIC46BROS-416  Threat Detection & Response Services856215ESS (Endpoint Security Services)TDRS $0.00 $10,000.00 
37738BI-457511601Financial Costing08/12/2022 19:26 11306Created11600JIRAUSER11600 DSLR Salary O&M / Salary5IT-05-SLR - $152,900.00IT-05-SLR23/24   1One-Time137738377383819 Virtual Private NetworkIH43BROS-425  ISO Protective Security Services856216Virtual Private NetworkPSS $3,475.00$152,900.00$0.00$152,900
37739BI-457611601Financial Costing08/12/2022 19:26 11306Created11600JIRAUSER11600 D  O&M / Salary10IT-05-SLR - $152,900.00IT-05-SLR23/24   1One-Time137739377393648 TDRSIC91BROS-406  Threat Detection & Response Services855211SIEM (Security Info & Event Mgt)TDRS $6,950.00$152,900.00$0.00$152,900
37740BI-457711601Financial Costing08/12/2022 19:26 11306Created11600JIRAUSER11600 D  Capital   23/24   10One-Time137740377403648 TDRSIC91BROS-406  Threat Detection & Response Services855211SIEM (Security Info & Event Mgt)TDRS $0.00 $10,000.00 
37741BI-457811601Financial Costing08/12/2022 19:26 11306Created11600JIRAUSER11600    O&M / Salary10IT-01-SLR - $152,900.00IT-01-SLR22/23   1 137741377413621 Security E&IIE53BROS-403  Security E&I839411DirectorE&I $6,950.00$152,900.00$0.00$152,900
37742BI-457911601Financial Costing08/12/2022 19:26 11306Created11600JIRAUSER11600 DPS: 10 days x $ 1,150.0/day PS10IT-02 - $86,213.00IT-0224/25   1On-going137742377423720 Threat Detection & Response ServicesIO97BROS-414  Threat Detection & Response Services856812Cyber Incident Response TeamTDRS $3,918.77$86,213.00$1,150.00$86,213
37743BI-458011601Financial Costing08/12/2022 19:26 11306Created11600JIRAUSER11600 D  O&M / Non-Salary220IT-04 - $118,499.00IT-0423/24   1On-going137743377433792 ISO Protective Security ServicesIN97BROS-422  ISO Protective Security Services856316Firewall - Zone SecurityPSS $118,499.00$118,499.00$0.00$118,499
37762BI-459211601Financial Costing12/12/2022 19:32 11306Created12311JIRAUSER12311 D  Capital11IT-02-SLR - $152,900.00IT-02-SLR23/24   10One-Time137762377623621 Security E&IIE53BROS-403  Security E&I839411DirectorE&I $7,645.00$152,900.00$1,099.00$152,900
37763BI-459311601Financial Costing12/12/2022 19:35 11306Created12311JIRAUSER12311 D  O&M / Salary10IT-01-SLR - $152,900.00IT-01-SLR23/24    One-Time137763377633865 ssc.directoryservices-servicesdannuaire.spc@canada.caIE53BROS-430  Security E&I839414esign for: Secure Remote Acces121255s; Network SecurityE&I - Services $6,950.00$152,900.00 $152,900

Hi,

 

Thanks for replying...I do have one question regarding the virtual table creation you suggested. When you indicated "create a virtual table that is the same as your table", is it the virtual table to be the same as the table in the visual or the table that the visual is drawing the data from?

Hi , @BarryM 

I mean defining virtual  table using var, like I said above.

var _t =ADDCOLUMNS(SUMMARIZE(ALLSELECTED(Table),'Table'[Column1 in your table],'Table'[Column2 in your table],....),"measure",[your measure])

Use this function to create a table that looks like your table viusal, and then use sumx to find total.

 

Thank you for your time and sharing, and thank you for your support and understanding of PowerBI! 

 

Best Regards,

Aniya Zhang

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

 

djurecicK2
Super User
Super User

Hi @BarryM ,

 It seems like you have the right approach- creating a measure (or 2 measures and adding them together).

 

What measures have you tried?

 

re is the dax code for what I have tried 

Salery Cost total for BR_12713 =
CALCULATE(
    SUM('BR Sub Issues and attributes'[Salary Cost per FY]),
    ALLSELECTED('BR Sub Issues and attributes'[Id])

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