Each row should contain the currency of the last date in the table

I am asking for help because I cannot cope anymore :slight_smile:

How to write a measure that will show the maximum currency from the last date depending on how many months we use

1 Like

Hi @Harris I’m sure we can help you solve this.

Are you able to post the PBIX file you’re working on please?

DJ

@DavieJoe Currency.pbix (3.0 MB)

Hello @Harris,

Thank You for posting your query onto the Forum.

In order to poplulate the results in all the individual rows as per the last date. Below is the measure alongwith the screenshot of the final results provided for the reference -

Currency As Per Last Date = 
VAR _Condition_1 = 
MAX( PnL[Currency YTD] )

VAR _Condition_2 =
CALCULATE( MAX( PnL[Słownik daty.Przesunięcie] ) , 
    ALLSELECTED( 'Calendar'[Date] ) )

VAR _Condition_3 = 
CALCULATE( MAX( PnL[Currency YTD] ) , 
    FILTER( ALLSELECTED( 'Calendar'[Date] ) , 
        'Calendar'[Date] = _Condition_2 ) )

VAR _Results = 
IF( ISBLANK( _Condition_1 ) ,
    BLANK() , 
    _Condition_3 )

RETURN
_Results

Final Results

I’m also attaching the working of the PBIX file for the reference purposes. :slightly_smiling_face:

Thanks and Warm Regards,
Harsh

Currency - Harsh.pbix (3.0 MB)

2 Likes