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
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] )))

@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
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.