Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
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.
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.