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.
Hi
I have a matrix with a range of numbers. The problem is that the total sums up all numbers as if they were were postive.
Problem: 2 735 000 + (-3 213 204) = 5 948 204
Should have been: 2 735 000 + (-3 213 204) = -478 204
All my number were origianally postive because my dataset wasn't that good. In order to change cost into a negative number, I have made a table with 1's and -1's and I change my values accordingly.
To test that my negitive number are actually negative I have:
Any help is appreciated
Thanks,
Espen
Solved! Go to Solution.
Thank you @Vvelarde
I found a solution with using a collumn (instead of a measure) and the formula:
Beløp med fortegn = if('Kontooversikt'[Fortegn]>0;'Økonomi'[Beløp];-'Økonomi'[Beløp])
It worked, so I am happy with that. Thank you for helping though
Regards,
Espen
I actually want to achieve the way your problem shows. What I have is the expenses being positive, but still can show Total as Revenue minus Expense (net amount). I think your problem is exactly what I expect. Can you tell me how you achieve that please?
Hi @Cavring,
In order to provide appropriate method for your sceanrio, could you please share sample data of your original tables and post expected result here? And we will appreciate it if you can post the formulas that you use to calculate Total Sum med fortegn measure.
Thanks,
Lydia Zhang
Hi @v-yuezhe-msft.
Thanks for your reply.
This is the result I am after (see bottom matrix in the screen clip):
During the day I have solve the problem, I believe there was a problem with the values being a 'measure'. I turned my values into a new collumn and that solved the problem.
Nevertheless, if you look at the above sreen shot from the incorrect data, there are 4 totals (in bold)
Eventhough my mesure is not the way to go about this, the above example seems very inconsistent.
Hi @Cavring,
You add date columns to the Matrix visual and the totals are not correct. How do you store the data in your original table? And what do you mean by "I turned my values into a new collumn" ?
Thanks,
Lydia Zhang
I didn't have and dates in the original matrix, but it was arranged by a year collumn.
Sorry for not being clear. What I did was I changed my values:
Thanks for helping,
Espen
Hi @Cavring,
Could you please post sample data of your original tables and formulas you use to calculate column/measures?
According to your description and based on the data in your screenshot, I am not able to reproduce your issue. I create a table using the following data, when I create a Matrix visual, everything works well. We need to know your formulas and original data to provide detailed troubleshoot steps.
Thanks,
Lydia Zhang
Here's my data:
Just so you know I found a solution and cleaned up my formulas. I have made a new measure, but it doesn't reproduce the error 100%.. The total for the whole matrix is still wong though. It doens not sum up correctly.
Looking your data the fast solution in this scenario is:
TS Total Sum med fortegn = IF ( HASONEVALUE ( Kontooversikt[Hovedpost] ), [Total Sum] * [Fortegn], CALCULATE ( [Total Sum] * [Fortegn], Kontooversikt[Hovedpost] = "0 Variable inntekter" ) + CALCULATE ( [Total Sum] * [Fortegn], Kontooversikt[Hovedpost] = "1 Faste kostnader" ) + CALCULATE ( [Total Sum] * [Fortegn], Kontooversikt[Hovedpost] = "2 Variable kostnader" ) + CALCULATE ( [Total Sum] * [Fortegn], Kontooversikt[Hovedpost] = "3 Finnans inntekter" ) )
For now you can solve with this, and then with more time to analyze tour data you can optimize this dax.
Thank you @Vvelarde
I found a solution with using a collumn (instead of a measure) and the formula:
Beløp med fortegn = if('Kontooversikt'[Fortegn]>0;'Økonomi'[Beløp];-'Økonomi'[Beløp])
It worked, so I am happy with that. Thank you for helping though
Regards,
Espen
Is your numeric column based on a measure or a column? If it is measure, technically it is not really summing up your numbers, it is essentially evaluating the measure based upon the context of ALL(). See my post here for a more detailed explanation:
http://community.powerbi.com/t5/DAX-Commands-and-Tips/Dealing-with-Measure-Totals/m-p/63376#U63376
Thank you Smoupre
My values are a measure. Your post explains it, so I played around with some very simple data from Excel to see if it would make any difference but with no luck.
What I am trying to do is to make a table/matrix that shows a company's cost and revenue with the sum at the bottom. Is there an easy way to do that?
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
109 | |
89 | |
76 | |
66 |
User | Count |
---|---|
126 | |
112 | |
99 | |
82 | |
73 |