Forum Discussion

PiyushBQ's avatar
PiyushBQ
Icon for Helper I rankHelper I
4 years ago
Solved

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

  • Hi,

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

    Please check the below picture and the attached pbix file.

     

     

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

2 Replies

  • Hi,

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

    Please check the below picture and the attached pbix file.

     

     

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