cancel
Showing results for
Did you mean:

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Frequent Visitor

value for min/max date for each item in table

I'm trying to show the difference between lowest/highest value of real estate offers next to eachother in one table.

I've got table like this.

And measures..

``````Mindate =
``````Maxdate =

But for some reason in few cases I dont see price for min/max date like in this example.

1 ACCEPTED SOLUTION
Community Support

I created a sample pbix file(see attachment) for you, please check whether that is what you want. You can update the formula of measure [Mindate] and [Maxdate] as below:

``````Mindate =
VAR _mindate =
CALCULATE (
FILTER (
ALLSELECTED ( 'estate_data' ),
)
)
RETURN
CALCULATE (
MAX ( 'estate_data'[price] ),
FILTER (
ALLSELECTED ( 'estate_data' ),
)
)``````
``````Maxdate =
VAR _maxdate =
CALCULATE (
FILTER (
ALLSELECTED ( 'estate_data' ),
)
)
RETURN
CALCULATE (
MAX ( 'estate_data'[price] ),
FILTER (
ALLSELECTED ( 'estate_data' ),
)
)``````

If the above one can't help you get the desired result, please provide more sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.

How to upload PBI in Community

Best Regards

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
3 REPLIES 3
Super User

Hi,

For these kind of calculations I recommend using thins kind of pattern:

``````Maxdate =

The idea here is to first define the desired date in variable then remove some filter context using all and finally returnin filters to the calculation by using the variable defined. You might need to adjust the variable and ALL to get the desired outcome but the idea remains the same. If you have calendar table instead of using ALL(estate_data[date_download]) in the calculate you can use ALL(calendar).

I hope this post helps to solve your issue and if it does consider accepting it as a solution and giving the post a thumbs up!

Proud to be a Super User!

Frequent Visitor

Hi, this solution does not solve my problem 😑. Of course for some "adverts" it works, like old measures worked too.

But for others still nothing.

In this case I'm not using any data tables etc. Only plain data table like in my first post

Community Support

I created a sample pbix file(see attachment) for you, please check whether that is what you want. You can update the formula of measure [Mindate] and [Maxdate] as below:

``````Mindate =
VAR _mindate =
CALCULATE (
FILTER (
ALLSELECTED ( 'estate_data' ),
)
)
RETURN
CALCULATE (
MAX ( 'estate_data'[price] ),
FILTER (
ALLSELECTED ( 'estate_data' ),
)
)``````
``````Maxdate =
VAR _maxdate =
CALCULATE (
FILTER (
ALLSELECTED ( 'estate_data' ),
)
)
RETURN
CALCULATE (
MAX ( 'estate_data'[price] ),
FILTER (
ALLSELECTED ( 'estate_data' ),
)
)``````

If the above one can't help you get the desired result, please provide more sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.

How to upload PBI in Community

Best Regards

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

Announcements

Power BI Monthly Update - November 2023

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

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors