Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago

Problem with measure

Hi,

I am trying to create a meaurse were I am adding something and filter it to only show the max fiscal year but the filter isn't working. Any Idea what is going on ? 

 

Summary Trade Volume = CALCULATE(TableA[Summary Net QTY]/1000, FILTER(Calendar, MAX([FiscalYear])))

3 Replies

  • ValtteriN's avatar
    ValtteriN
    Community Champion

    Hi,

    Try this:


    Summary Trade Volume =
    var maxyear = CALCULATE(MAX([FiscalYear]),ALL(Calendar)) return
     
    CALCULATE(TableA[Summary Net QTY]/1000ALL(Calendar),Calendar[FiscalYear]=maxyear)

    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!

    My LinkedIn: https://www.linkedin.com/in/n%C3%A4ttiahov-00001/

  • v-yalanwu-msft's avatar
    v-yalanwu-msft
    Community Support

    Hi, Anonymous ;

    You could try it.

    Summary Trade Volume =
    CALCULATE (
        TableA[Summary Net QTY] / 1000,
        FILTER (
            'TableA',
            [Date] = CALCULATE ( MAX ( Calendar[FiscalYear], ALLSELECTED ( Calendar ) ) )
        )
    )
    

    If not right, can you share a simple Scenario to explain your specific requirements ? More information make it easier to give you a solution. Looking forward to your reply.

    Best Regards,
    Community Support Team_ Yalan Wu
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

  • v-yalanwu-msft's avatar
    v-yalanwu-msft
    Community Support

    Hi,  Anonymous ;

    Is your problem solved?? If so, Would you mind accept the helpful replies as solutions? Then we could close the thread. More people who have the same requirement will find the solution quickly and benefit here. Thank you.

    Best Regards,
    Community Support Team_ Yalan Wu
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.