Forum Discussion

Omega's avatar
Omega
Icon for Impactful Individual rankImpactful Individual
5 years ago
Solved

Repeating same value for all months based on year

Hi, 

 

This kinda basic question but can't have it work. I have currency table and that is changed once per year. How can I use the same same currency for all months in a particular year? For example, I want all the months in 2020 to be 2 while in 2021 to be 3. 

 

I have calendar table connected to the currency table.

 

I tried ALL, ALLEXCEPT, ALLSELECT but none worked. 

 

DateCurrency value
1/1/2020     2
1/1/2021     3

 

Any ideas? Thanks!

  • Hi Omega ,

    Create a measure like this:

    A =
    CALCULATE (
        MIN ( 'Currency table'[Currency value] ),
        FILTER (
            ALL ( 'Currency table' ),
            YEAR ( 'Currency table'[Date] )
                = YEAR ( SELECTEDVALUE ( 'Calendar table'[Date] ) )
        )
    )
    

    Attached a sample file in the below, hopes to help you.

     

    Best Regards,
    Community Support Team _ Yingjie Li
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

2 Replies