Forum Discussion
Dax
i suppose first , you should convert your values to one currency . create a cluclated column for this
you can convert GBP to euro or vise versa.
now , you can use this new column for the measure to caluclate the sum .
from my understanding, you want to calculate the sum(values) , for all april , before the month-year selected from a slicer,
so if you select 2023-07 , thus you want to calculate the sum(values) for 2023-4, 2022-04, 2021-04 ,... .
if that is the case , use the following measure :
measure =
var mdate = max(tbl_name[date_col_name])a
var ds_date =
filter(
calculatetable(
values(tbl_name[date_col_name]),
removefilters(tbl_name[date_col_name]),
tbl_name[date_col_name] <= mdate
),
year(table_name[date_col_name]) <= year(mdate ) && month(table_name[date_col_name]) = 4
)
return
calculate (
sum(tbl_name[value_col_name]) ,
removefilters( tbl_name[date_col_name]) ,
ds_date
)
NB : replace the table_name and column names with the respective names from your model .
let me know if this helps .
If my answer helped sort things out for you, i would appreciate a thumbs up 👍 and mark it as the solution ✅
It makes a difference and might help someone else too. Thanks for spreading the good vibes! 🤠