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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
Labraham36
Helper I
Helper I

Get column value by filtering

Good morning community: I have a query:

 

It happens that I have a table with many repeating dates. For each date I have a certain value, which is repeated in each row of the same date. Ex: 1/4/2021 20 1/4/2021 20 Etc. For the same date, the value will not vary, it can only vary between different dates. What I would need is to put together a function that captures that value for me per day. I tried "MAX" but it captures the highest value of the entire column, so it did not work for me. I would need something that allows me to filter by day and take the value for each day. I attach an image of the data to better understand the problem.

 

Thanks!

 

Problema Power BI.png

1 ACCEPTED SOLUTION
v-janeyg-msft
Community Support
Community Support

Hi, @Labraham36 

 

You can modify your column.

Like this:

 

maxrecurso =
MAXX ( FILTER ( ALL ( table ), [date] = EARLIER ( table[date] ) ), [Recurso] )

 

If it doesn’t solve your problem, please feel free to ask me.

 

Best Regards

Janey Guo

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
v-janeyg-msft
Community Support
Community Support

Hi, @Labraham36 

 

You can modify your column.

Like this:

 

maxrecurso =
MAXX ( FILTER ( ALL ( table ), [date] = EARLIER ( table[date] ) ), [Recurso] )

 

If it doesn’t solve your problem, please feel free to ask me.

 

Best Regards

Janey Guo

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

AlB
Super User
Super User

@Labraham36 

If you place CHK Fecha in the x axis of the visual you are showing,

MAX(Table1[Recurso]) will give you the result you are looking for

 

SU18_powerbi_badge

Please accept the solution when done and consider giving a thumbs up if posts are helpful. 

Contact me privately for support with any larger-scale BI needs, tutoring, etc.

 

AlB
Super User
Super User

Hi @Labraham36 

What do you mean "a function that captures that value for me per day"?

Can you show exactly the expected result? Do you want it in a visual, elsewhere?

You could

1.  Set CHK Fech in a table visual

2. Place this measure in the visual:

Measure  = MAX(Table1[Recurso])

 

SU18_powerbi_badge

Please accept the solution when done and consider giving a thumbs up if posts are helpful. 

Contact me privately for support with any larger-scale BI needs, tutoring, etc.

 

 

 

Thanks for the reply !

 

I need to create a measure that brings me for a date, the value of the resource. That is, for the same date I have many values ​​(which are the same repeated value. As seen in the image) I need to build a measure that, for example, for 1/4/2021, if that date has 10 rows with the value 12, do not add the 10 rows, just bring me that unique value for that day. I tried with Max but it brings me the highest value of a whole column, and the column has several different days, so it doesn't work for me. It is in principle to put on a graph that what it does is record that value per day. I send an image so that it is understood what it should achieve. There I raised the value "12" using the MAX, but it evaluates it in the whole column, and I would need it to only evaluate by date EX: Bring the value for 1/4/2021, for 4/2/2021, etc.

 

Sin título.png

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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