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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Adity
Regular Visitor

MIN Function giving wrong total

Screenshot_2.pngI have 2 measures say
Total_Sales & Sales_LastYear.
I needs to find the MIN of these two column and sum the MIN value. When I do so, It shows the sum of Sales_LastYear.
Dax used:
Minimum (Incorrect Total) = MIN( [Total Sales], [Sales LY] )
Where am I going wrong?
1 ACCEPTED SOLUTION

Hi, @Adity 

Maybe it need a little modified ,try to add another formula as below:

Measure = SUMX('Table',[Minimum (Incorrect Total)])

or

Measure = SUMX('Date'[Month Year],[Minimum (Incorrect Total)])

46.png

 

If it doesn't work , please share your sample file for further research.

 

Best Regards,
Community Support Team _ Eason

View solution in original post

8 REPLIES 8
PhilipTreacy
Super User
Super User

Hi @Adity 

You need to show us your data and what you are doing otherwise we're working in the dark and guessing.

You said that you've got 2 measures and that you need to find the MIN of these 2 columns.  Measures and Columns are different things.  You can't get the MIN of a measure because a measure only produces a single value.

Again, without seeing you data and your calculations, it's not clear what you are trying to do.

Regards

Phil



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


Screenshot_2.pngIf you can see the total.. It shows 1,68,075.. But it should have been close to 6000.. 😞

Hi, @Adity 

Maybe it need a little modified ,try to add another formula as below:

Measure = SUMX('Table',[Minimum (Incorrect Total)])

or

Measure = SUMX('Date'[Month Year],[Minimum (Incorrect Total)])

46.png

 

If it doesn't work , please share your sample file for further research.

 

Best Regards,
Community Support Team _ Eason

@PhilipTreacy .. Can you please check the tread below.. I added the picture of What i am expecting excatly. 

jaideepnema
Solution Sage
Solution Sage

Hi @Adity ,
can you please share some sample data for the same and also the expected output ?

This i what I am expecting.. It has the total sales thi year and total sales last year. It finds the MIN .. BUt while summing up .. It creates an issue. Need help to fix thisThis i what I am expecting.. It has the total sales thi year and total sales last year. It finds the MIN .. BUt while summing up .. It creates an issue. Need help to fix thisThis is the sample.. Have the Total sales and comparing with sales last year. Finding the Minimum of it too! but somewhere I miss the total of it.. Can u suggest something on why this happens?

amitchandak
Super User
Super User

@Adity , For total you need force a row context

 

example

 

Sumx(Values('Date'[Month Year]), calculate( MIN( [Total Sales], [Sales LY] )))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

@amitchandak  For some reason I dont find any change in the solution. By giving your query i wasnt able to see the MIN values in my column.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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