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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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
Sept PBI Carousel

Power BI Monthly Update - September 2024

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

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

Sept NL Carousel

Fabric Community Update - September 2024

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

Top Kudoed Authors