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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
gianmarco
Helper IV
Helper IV

Insert a row to a column (which is a sum of another table column)

Dear All,

I have two tables:

Table A (clients-revenues)

ClientDateInvoiceTotal
x01/01/231300
y02/01/232600
x02/01/233400

 

Table B (special client revenue)

Special ClientDateTotal
z (always the same)03/01/23200
z (always the same)04/01/23300

 

I came up with a visual which sums TABLE A's revenues by grouping clients per unique row:

ClientTotal revenue
x700
y600

 

What I want to achieve now is bringing in the same visual one new row which is my single special client's revenues(client z):

ClientTotal revenue
x700
y600
z500

 

 

Thank you for your help

gianmarco

 

 

2 REPLIES 2
Arul
Super User
Super User

@gianmarco ,

try this in calculated table,

Total cost = 
VAR _total = SUMMARIZE(
    'Table A',
    'Table A'[Client],
    "Total Revenue",SUM('Table A'[Total]))
VAR _lastrow = SUMMARIZE(
    'Table B',
    'Table B'[Special Client],
    "Total",SUM('Table B'[Total]))
VAR _result = UNION(_total,_lastrow)
RETURN _result

Thanks,

Arul





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

Proud to be a Super User!


LinkedIn


gianmarco
Helper IV
Helper IV

Cannot make a UNION cause tables are different...

Helpful resources

Announcements
Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Jan NL Carousel

Fabric Community Update - January 2025

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