Forum Discussion
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.
| Date | Currency 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
- amitchandak
Super User
Omega , I usually use CLOSINGBALANCEYEAR, for that you need year-end date. But that will be a measure
refer example : https://community.powerbi.com/t5/Community-Blog/Power-BI-Distributing-Allocating-the-Yearly-Target-Convert-to/ba-p/1476400
- v-yingjl
Community Support
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.