Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
I have a measure that converts the values to selected currency
Отгрузка расчетного года без рейсов =
var currency_main = SELECTEDVALUE('Контрагенты'[Currency_to_convert])
return
SUMX(
'_заказы_поставщику_товары_без_рейса',
var kurs_val_o = COALESCE(
maxx(
FILTER('_курсы валют',
'_курсы валют'[period] = '_заказы_поставщику_товары_без_рейса'[period] && '_курсы валют'[Валюта] = RELATED('ЗП_список'[Валюта])),
'_курсы валют'[Курс]
),
1
)
var kurs_val_r = COALESCE(
maxx(
FILTER('_курсы валют',
'_курсы валют'[period] = '_заказы_поставщику_товары_без_рейса'[period] && '_курсы валют'[Валюта] = currency_main),
'_курсы валют'[Курс]
),
1
)
return
'_заказы_поставщику_товары_без_рейса'[quantity]*'_заказы_поставщику_товары_без_рейса'[Цена]*if(RELATED('ЗП_список'[Валюта]) = currency_main, 1, kurs_val_o/kurs_val_r)
)But the problem is when in the table with orders there are dates with a future period it doesnt convert.
I need to convert the values on the last date of table with currencies . For example , if in table with orders [period]> currency[period], then we calculate on the last date exists in table with currencies.
Solved! Go to Solution.
Hi, @Anonymous
You can create a measure instead of period, then use it in formula.
Like this:
measure =
VAR a =
CALCULATE ( MAX ( table2[period] ), ALL ( table2 ) )
RETURN
IF ( SELECTEDVALUE ( table[period] ) > a, a, SELECTEDVALUE ( table[period] ) )
Best Regards
Janey Guo
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @Anonymous
You can create a measure instead of period, then use it in formula.
Like this:
measure =
VAR a =
CALCULATE ( MAX ( table2[period] ), ALL ( table2 ) )
RETURN
IF ( SELECTEDVALUE ( table[period] ) > a, a, SELECTEDVALUE ( table[period] ) )
Best Regards
Janey Guo
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.