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 September 15. Request your voucher.

Reply
Kjellke
Helper I
Helper I

Table not showing summarized values

Hi, i am quite new to Power BI, but i am trying to make some with data ive successfully exported from our ERP system.

I am now trying to have two collumns that one that summarize the positive numbers, and one that summarize the negative numbers, and show the total number on the bottom of my table.

I am using the following formulas (where i successfully get the required output):

INN = SUMX(PROJINVOICEJOUR,PROJINVOICEJOUR[FAKTURERT])

UT = CALCULATE(SUMX(PROJTRANSPOSTING,PROJTRANSPOSTING[AMOUNTMST]),PROJTRANSPOSTING[POSTINGTYPE]<>122)

UTTAK = CALCULATE(SUMX(PROJTRANSPOSTING,PROJTRANSPOSTING[AMOUNTMST]),PROJTRANSPOSTING[ACCOUNT]="2901")

I then try the two following formulas for each of the abovementioned collumns in my visual table

Collumn 1 (visual) = IF(([INN]-[UTTAK]-[UT])>0,([INN]-[UTTAK]-[UT]),"")
Collumn 2 (visual) = IF(([INN]-[UTTAK]-[UT])<0,([INN]-[UTTAK]-[UT]),"")

 

The individual lines seems to show the correct numbers, but my totals are completely off, and is even missing on Collumn 2. (See printscreen).

I was wondering if anyone has any tips that could please point me in the right direction for this.

I would highly appreciate any help on this subject.

 

Kjellke_0-1631196844582.png

 

 

 

11 REPLIES 11
Kjellke
Helper I
Helper I

Has anyone had a chance to take a look at this? 🙂

Syndicate_Admin
Administrator
Administrator

After hours on google i have now tried the following formula with no success.

FORMULA = 
VAR _UTTAK = CALCULATE(SUMX(PROJTRANSPOSTING,PROJTRANSPOSTING[AMOUNTMST]),PROJTRANSPOSTING[ACCOUNT]="2901")
VAR _UT = CALCULATE(SUMX(PROJTRANSPOSTING,PROJTRANSPOSTING[AMOUNTMST]),PROJTRANSPOSTING[POSTINGTYPE]<>122)
VAR _INN = SUMX(PROJINVOICEJOUR,PROJINVOICEJOUR[FAKTURERT])

return IF(_INN-_UT-_UTTAK<0,_INN-_UT-_UTTAK,0)

Kjellke_1-1631786219599.png

 

 

I get the following error message from that link.

Kjellke
Helper I
Helper I

After hours on google i have now tried the following formula with no success.

FORMULA = 
VAR _UTTAK = CALCULATE(SUMX(PROJTRANSPOSTING,PROJTRANSPOSTING[AMOUNTMST]),PROJTRANSPOSTING[ACCOUNT]="2901")
VAR _UT = CALCULATE(SUMX(PROJTRANSPOSTING,PROJTRANSPOSTING[AMOUNTMST]),PROJTRANSPOSTING[POSTINGTYPE]<>122)
VAR _INN = SUMX(PROJINVOICEJOUR,PROJINVOICEJOUR[FAKTURERT])

return IF(_INN-_UT-_UTTAK<0,_INN-_UT-_UTTAK,0)

Kjellke_1-1631786219599.png

 

 

Kjellke
Helper I
Helper I

I have not yet figured this out, and i do not know how to export raw data from my dataset.

I hope i can provide with more useful information to find a solution to this problem.

Thank you!

Anonymous
Not applicable

@Kjellke 

Well, you can just export the underlying dataset. Not sure if this is what you are looking for.
Export data from a Power BI visualization - Power BI | Microsoft Docs

 

 

Paul Zheng _ Community Support Team
If this post helps, please Accept it as the solution to help the other members find it more quickly.

 

 

Kjellke
Helper I
Helper I

Dear Edhans,

Thank you very much for your feedback. The collumn 1 and collumn 2 is just names for the collumns in the visual table.

All calculations from the table is done in calculation INN, UT and UTTAK.

="2901" and <>122 is filtered values from different collumns from my data table, as i am exporting accounting data from our ERP system, numbers are from different accounts and categories.

 

PROJTRANSPOSTING[AMOUNTMST] can be costs, revenue or profits - it just depends on these filters/categories.

Unfortunately i dont think i will be able to share any data - I will check tomorrow if we have some "dummy" data in our ERP system to avoid sharing any confidential information.

I will take note of your comment regarding "" as else, and use BLANK() instead.

 

Since my visual table collums show data calculated from several database tables that are connected, i dont know how to compute this inside a new database table collumn.

You can use RELATED or RELATEDTABLE to get data from one table into another in a calculated column.

That said, I, like you, much prefer a measure, but I'd need some fake data to assist with here.




Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting

Dear Edhans,

Thanks again for your involvement. I am trying to sort out how to export raw data from my power bi data tables.

All my data is exported/connected to the SQL server of our ERP system - And i cannot seem to find an easy way to export this.

edhans
Super User
Super User

It depends on the granularity of your data. The totals in a Power BI visual do not add up the numbers above, they recalculate at a total level with no filters.

I would consider adding your Positive and Negative columns as either computed columns in Power Query or calculated columns in Power BI, then add those columns to your report. That will preserve the line item granularity.

I am not sure what your formulas above are doing exactly. ="2901" and <>122 seem arbitrary to me, though I am sure it is meaningful in your data. If you could post sample data or link to a sample PBIX file (no confidential info though) it would be helpful.

One other thing to do is not use "" as your else condition. I recommend either of the following:

Collumn 1 =
IF(
    ( [INN] - [UTTAK] - [UT] ) > 0,
    ( [INN] - [UTTAK] - [UT] ),
    0
)

Collumn 1 =
IF(
    ( [INN] - [UTTAK] - [UT] ) > 0,
    ( [INN] - [UTTAK] - [UT] ),
    BLANK()
)

It is also not clear what INN, UTTAK and UT are. Those are in the syntax of measures, but then you are referring to them as inside columns, which is not common, unless you are just referring to the columns in a table visual vs columns in the model.

 

How to get good help fast. Help us help you.

How To Ask A Technical Question If you Really Want An Answer

How to Get Your Question Answered Quickly - Give us a good and concise explanation
How to provide sample data in the Power BI Forum - Provide data in a table format per the link, or share an Excel/CSV file via OneDrive, Dropbox, etc.. Provide expected output using a screenshot of Excel or other image. Do not provide a screenshot of the source data. I cannot paste an image into Power BI tables.



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting

Dear Edhans,

I did not manage to export the raw data, but i managed to export the table into excel, and do the calculations there, i also made a comment above all collumns where i get the data from.

The tables PROJTRANSPOSTING and PROJINVOICEJOUR is related with a collumn containing project number.

I hope this can give an idea of what i am trying to achieve, and how to get there.

The dataset can be downloaded on the following link:

https://wetransfer.com/downloads/0220cd3c2cacaf3e24602002aab7ad4f20210920081428/23e596f89e6a9b037bd1...

Thank you very much.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors