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
Maulik_Patel
New Member

How to find the minimum value within a column depending on the other columns in the Dataset

So in the picture below, you can see 3 columns. Now I want to choose the lowest value in the Ticket_owner_avg so the first column should look like:

Account - Creation| VNordfors| 0.14

and so on with the lowest value in  the Ticket_owner_avg column.

I have tried to make a formula but so far nothing is working. I have changed the formula to this: 

Min_Measure = GROUPBY(data, data[Item], "Ticket_owner_average",MINX(CURRENTGROUP(),data[Ticket_owner_avg]))
I am getting this error: The expression refers to multiple columns. Multiple columns cannot be converted to a scalar value.

Any help is appreciated! Thank you

Screenshot (743).png

1 ACCEPTED SOLUTION

@Maulik_Patel 

My mistake I forgot that Ticket_owner_avg is a column


Filter Measure =

SUM ( [Ticket_owner_avg] ) - [Min_Measure]

View solution in original post

12 REPLIES 12
tamerj1
Super User
Super User

Hi @Maulik_Patel 
GROUP by returns a table not a scalar value. Anyway, if I correctly understand your requirement then you can use 

 

Min_Measure =
MINX (
    CALCULATETABLE ( data, ALLEXCEPT ( Data, data[Item] ) ),
    data[Ticket_owner_avg]
)

 

So now, the output is as follows in the image below:

I want the ouput in the way below:

Account Creation VNordfors 0.14 0.14

Account Disable RSmith 0.7 0.7

and so on, I do not want the other rows to show up, I just want the minimum for each Item in the Item column.

Screenshot (744).png

@Maulik_Patel 

Create new measure

Filter Measure =
[Ticket_owner_avg] - [Min_Measure]

place this measure in the filter pane and select "is" and insert the value "0"


you can also take out the Min_Measure from the table if you are not interested in showing it. 

please let me know if you still have any doupt

So I made the measure and inserted it in the Filters on this visual section and chnaged the filter values accordingly but it just removes all the data and leaves me with a blank page except for the column headers as shown in the picture above:

Screenshot (752).pngScreenshot (753).png

So I made the measure and inserted it in the Filters on this visual section and chnaged the filter values accordingly but it just removes all the data and leaves me with a blank page except for the column headers as shown in the picture above:

Screenshot (752).pngScreenshot (753).png

@Maulik_Patel 

Is there a chance that the only the rounding of the numbers are equal but in fact they are not?

@Maulik_Patel 

Did you select "is"? Can you sahre a screenshot?

Here it is!

Screenshot (753).png

I feel like the measure has some calculation errors as when I add it as a column to the visual, this is what I get:

Yes that could be the case, that only the rounded numbers are equal and not the actual numbers

Screenshot (754).png

@Maulik_Patel 

My mistake I forgot that Ticket_owner_avg is a column


Filter Measure =

SUM ( [Ticket_owner_avg] ) - [Min_Measure]

All good man, it worked and Thank you for your patience and help! I really appreciate it!

VahidDM
Super User
Super User

Hi @Maulik_Patel 

 

Can you post sample data as text and expected output?

please see this post regarding How to Get Your Question Answered Quickly:
https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2.
4. Relation between your tables

Appreciate your Kudos!!
LinkedIn:www.linkedin.com/in/vahid-dm/

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

Top Solution Authors