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
PiyushBQ
Helper I
Helper I

Find MAX Value based on Date Silcer

Hello,

 

I have this data:

DateTickerClose
11-May-22AA56.66
10-May-22AA55.84
9-May-22AA54.21
6-May-22AA61.04
5-May-22AA63.46
4-May-22AA67.96
3-May-22AA64.66
2-May-22AA66.16
11-May-22AACG1.04
10-May-22AACG1.075
9-May-22AACG1.07
5-May-22AACG1.17
2-May-22AACG1.16
6-May-22AACG1.14
4-May-22AACG1.1466
3-May-22AACG1.16

How do I find the maximum closing price, based on date slicer.

Example: If I set the date slicer to "11 May and 10 May" then the output should look like this:

DateTickerClose Max Close
11-May-22AA56.6656.66
10-May-22AA55.8456.66
11-May-22AACG1.041.075
10-May-22AACG1.0751.075


Similarly, if I widen the date slicer to cover more dates, the table should update dynamically. 

I'm not adding new columns to keep the actual dataset manageable. 

Thanks in advance!
 

Piyush

1 ACCEPTED SOLUTION
Jihwan_Kim
Super User
Super User

Hi,

The below is for creating a measure without having DIM-Calendar table.

Please check the below picture and the attached pbix file.

 

Untitled.png

 

Max close measure: =
IF (
    HASONEVALUE ( Data[Ticker] ),
    MAXX (
        FILTER ( ALLSELECTED ( Data ), Data[Ticker] = MAX ( Data[Ticker] ) ),
        Data[Close]
    )
)

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.


Go to My LinkedIn Page


View solution in original post

2 REPLIES 2
PiyushBQ
Helper I
Helper I

This is perfect, thank you so much @Jihwan_Kim 😄

Jihwan_Kim
Super User
Super User

Hi,

The below is for creating a measure without having DIM-Calendar table.

Please check the below picture and the attached pbix file.

 

Untitled.png

 

Max close measure: =
IF (
    HASONEVALUE ( Data[Ticker] ),
    MAXX (
        FILTER ( ALLSELECTED ( Data ), Data[Ticker] = MAX ( Data[Ticker] ) ),
        Data[Close]
    )
)

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.


Go to My LinkedIn Page


Helpful resources

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

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.