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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
djreyes
Helper I
Helper I

MAXA - not showing the largest value in a column

Hello, 

I am not really sure as to why. The computation that I have is off. Values in PowerBi is different from Excel. 

 

This is what I used in PowerBi: Max used = MAXA('SCM ItemsOutboundRelief_AX'[QTY negative to positive])

djreyes_0-1714252161554.png

 

And if you use MAX in excel this is what is showing, and its far different. 

djreyes_1-1714252199091.png

 

I am not really sure, what I am missing. Even if I use MAX, values are still not the same.

1 ACCEPTED SOLUTION

pls try

maxnegative = max('Sheet1'[Sum of qty])
maxpositive = abs(min('Sheet1'[Sum of qty]))
averagepostive = abs(AVERAGE(Sheet1[Sum of qty]))
 




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

Proud to be a Super User!




View solution in original post

8 REPLIES 8
ryan_mayu
Super User
Super User

could you pls provide some sample data?





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

Proud to be a Super User!




Its quite a lot of data though, its from 2018 to 2024. I did check it manually and excel is correct and powerbi is not. Do you want just 1 year of data?

have you checked each year's data? Do they match in excel and powerbi? if not, you can have a further investigation to check each month's data. Maybe at the end, you can pick up only one month or one week data to have a deep investigation to find the root cause. We don't need a large amount of sample data. if you can reduce it, that will be better.





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

Proud to be a Super User!




I did, extracted the data from PowerBi to excel and I did check manually and the data is the same. Even the average is incorrect.

then pls provide the sample data. you can upload to onedrive





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

Proud to be a Super User!




Here is the thing, the original quantity column is negative, so I needed to change that to + by creating a new column. Is that the reason as to why? Because when I use the original quantity column which is negative its showing the incorrect value as well.

Is there an option for me not to provide the data? The data is private I am sorry. I am really wondering as to why January and December have the same value in excel and powerbi but the rest of the months it doesnt.

pls try

maxnegative = max('Sheet1'[Sum of qty])
maxpositive = abs(min('Sheet1'[Sum of qty]))
averagepostive = abs(AVERAGE(Sheet1[Sum of qty]))
 




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

Proud to be a Super User!




Helpful resources

Announcements
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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