Forum Discussion
Anonymous
2 years agoNot applicable
How create a condition with LOOKUPVALUE
Hi! I have two different datas, as in the tables below country date type value peru 01/01/2023 old 5000 peru 02/01/2022 old 4000 peru 03/01/2022 old 8000 peru 04/...
SQL_SousChef
2 years agoFrequent Visitor
is the goal to have both a old value and new value? I am not sure I understand the question here but if you want the "new" value for each country/date then you can use this:
NewValue =
SUMX ( FILTER ( data, data[type] = "new" ), data[value] )
- Anonymous2 years agoNot applicable
I tried this solution, but returns only the general sum of value for just type . I want the value sum by data, country and type. I would like to use LOOKUPVALUE (using arguments data and country) with filter by type
I tried this too, but it doesn't work
New = LOOKUPVALUE (
'a1'[value],
'a1'[date], a2[date],
'a1'[country], a2[country],
'a1'[type], "new")
- SQL_SousChef2 years agoFrequent Visitor
Can you try putting the country and date in a table then add the measure I provided. It should show you the new value for each date and country combo.