Forum Discussion

MortimerMcFly's avatar
MortimerMcFly
Frequent Visitor
2 years ago
Solved

Max Value and Value -1 / Version

Hi all, 

 

this is probably not the hardest but I feel a little hopeless after trying for a while now. 

 

my Situation:

 

I have a table with some names, delievery_dates, uuid, and a version number. Every Day several emails are sent from "Name A" and for every mail there is a version no. So every day we have a couple of rows for each Name. 

 

What do I need? 

 

I need a column which gives me the information if a version number is a "Plan" (Max Version no. for a specific day) or a "Forecast" (every other version before the max value). 

 

Simplified Example 

 

Thanks Guys! 

  • Hi MortimerMcFly - Can you try the below calculated column in you dataset.

     

    calculated column calculation FYR:

     

    ExpectedOutput =
    VAR MaxVersion =
        CALCULATE(
            MAX('FCP'[Version]),
            ALLEXCEPT('FCP', 'FCP'[Name], 'FCP'[Delivery])
        )
    RETURN
    IF('FCP'[Version] = MaxVersion, "Plan", "FC")

     

     

     

    Did I answer your question? Mark my post as a solution! This will help others on the forum!
    Appreciate your Kudos!!

1 Reply

  • Hi MortimerMcFly - Can you try the below calculated column in you dataset.

     

    calculated column calculation FYR:

     

    ExpectedOutput =
    VAR MaxVersion =
        CALCULATE(
            MAX('FCP'[Version]),
            ALLEXCEPT('FCP', 'FCP'[Name], 'FCP'[Delivery])
        )
    RETURN
    IF('FCP'[Version] = MaxVersion, "Plan", "FC")

     

     

     

    Did I answer your question? Mark my post as a solution! This will help others on the forum!
    Appreciate your Kudos!!