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

Shape the future of the Fabric Community! Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions. Take survey.

Reply
taimaizumi
Helper I
Helper I

How to identify minimum value in the same row

Hi, team!

I'd like to know how to idenfity minimum value in the same row.
Below is detail.

 

------------------------------------------------------------


<What I'd like to know>

How to identify minimum value among Year 2015-Year 2021 by each "Products" in the same table named "Sales" as following.

taimaizumi_0-1669607126296.png


<Output image>
Column "Minimum value" and "Minimum year" are output I'd like to get

taimaizumi_1-1669607226335.png

 

<Background>

  • Function "min" need "Column" , so I could'nt use this function in such situation
  • I reseached the function which can compare scalar of each argument, but I couldn't get it

------------------------------------------------------------

1 ACCEPTED SOLUTION
Jihwan_Kim
Super User
Super User

Hi,

I suggest unpivotting it in Power Query Editor.

Or, if Power Query Editor is not reachable, try creating a virtual tables those contain two columns (Product column and one of Year columns)  inside a DAX measure, and then union all of them. And then MIN dax function can be possible used.

Thanks.

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Visit my LinkedIn page by clicking here.


Schedule a meeting with me to discuss further by clicking here.

View solution in original post

2 REPLIES 2
taimaizumi
Helper I
Helper I

@Jihwan_Kim 

Thank you for your prompt help!


@taimaizumi wrote:

Hi, team!

I'd like to know how to idenfity minimum value in the same row.
Below is detail.

 

------------------------------------------------------------


<What I'd like to know>

How to identify minimum value among Year 2015-Year 2021 by each "Products" in the same table named "Sales" as following.

taimaizumi_0-1669607126296.png


<Output image>
Column "Minimum value" and "Minimum year" are output I'd like to get

taimaizumi_1-1669607226335.png

 

<Background>

  • Function "min" need "Column" , so I could'nt use this function in such situation
  • I reseached the function which can compare scalar of each argument, but I couldn't get it

------------------------------------------------------------


-->I understand your comment. Normally, it's impossible to compare and get minimum value for same record.


 

Jihwan_Kim
Super User
Super User

Hi,

I suggest unpivotting it in Power Query Editor.

Or, if Power Query Editor is not reachable, try creating a virtual tables those contain two columns (Product column and one of Year columns)  inside a DAX measure, and then union all of them. And then MIN dax function can be possible used.

Thanks.

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Visit my LinkedIn page by clicking here.


Schedule a meeting with me to discuss further by clicking here.

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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