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
dbobonec
Frequent Visitor

Table with an explicit total column

Hi,

 

I'm struggling with the following problem: I need to create a table in Power BI Desktop that give me a measure value (let's say capital) by ContractType and Bank, as the example below, but I also need a specific column with the sum of all the bank values (column AllBanks). 

The point is I cannot use the Total out-of-the-box feature because when I export this data to a csv totals are not included (well known limitation, not yet solved by Microsoft) and I need to be to export all data in the table.

 

ContractTypeBankABankBBankCAllBanks
TypeA100200300600
TypeB200300400900
TypeC3004005001200

 

Can anyone help me with this topic please?

 

Thanks,

Diogo

1 ACCEPTED SOLUTION

Hi @v-easonf-msft,

Thank you very much for your reply, for what I see from your pbix it will work for my example.
I need to adapt it to my real problem, with higher complexity, but I will accept it as a solution!

Thank you and regards, Diogo 

View solution in original post

4 REPLIES 4
v-easonf-msft
Community Support
Community Support

Hi, @dbobonec 

If you want to export the column subtotal in matix through "export data" in PowerBI Desktop, I am afraid that there is no corresponding solution yet.

You need to manually create an actual Total measure and apply it to the value of your matrix.

 

All Banks = CALCULATE(SUM('Table'[value]),ALLEXCEPT('Table','Table'[Bank]))

 

And you will find the total in the csv file you exported.

46.png

If I misunderstood, please let me know.

 

 

Best Regards,
Community Support Team _ Eason

Hi @v-easonf-msft,

Thank you very much for your reply, for what I see from your pbix it will work for my example.
I need to adapt it to my real problem, with higher complexity, but I will accept it as a solution!

Thank you and regards, Diogo 

mahoneypat
Employee
Employee

Is your data unpivoted (i.e., all bank names in same column)?  That is the recommended format but it can be done either way.  Do you plan to export from a matrix visual?  or are you going to copy out of data view or the query editor?

 

Regards,

Pat





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


Hi mahoneypat,

Thank you for your reply.
Yes, all bank names are in the same column.

My goal is to export to a csv file from a matrix visual, using «export data» option.

Regards,

Diogo

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.

Top Solution Authors