Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi there :),
I have the following data:
Product | Month | Volume Forecast | Volume Actuals | Spend FC | Actual Spend |
abc | 01.2022 | 1 | 888 | ||
abc | 02.2022 | 1 | 888 | ||
abc | 03.2022 | 1 | 888 | ||
abc | 04.2022 | 1 | 888 | ||
abc | 05.2022 | 1 | 888 | ||
abc | 06.2022 | 1 | 888 | ||
abc | 07.2022 | 1 | 888 | ||
abc | 08.2022 | 1 | 888 | ||
abc | 09.2022 | 1 | 888 | ||
abc | 10.2022 | 1 | 900 | ||
abc | 11.2022 | 1 | 900 | ||
abc | 12.2022 | 1 | 900 | ||
ccc | 01.2022 | 1 | 222 | ||
ccc | 02.2022 | 1 | 222 | ||
ccc | 03.2022 | 1 | 222 | ||
ccc | 04.2022 | 1 | 222 | ||
ccc | 05.2022 | 1 | 222 | ||
ccc | 06.2022 | 1 | 222 | ||
ccc | 07.2022 | 1 | 222 | ||
ccc | 08.2022 | 1 | 222 | ||
ccc | 09.2022 | 1 | 250 | ||
ccc | 10.2022 | 1 | 250 | ||
ccc | 11.2022 | 1 | 250 | ||
ccc | 12.2022 | 1 | 250 |
where I need to get the Actual Spend for the last month for which I have Volume Actuals, per product. I already created a measure to calulate the last month per product "Measure 1"= CALCULATE(MAX(table[Month]),FILTER(table, table[Volumes Actuals]=1)). I was thinking that if I use LOOKUPVALUE(table[Volumes Actuals], table[Month], Measure 1 it will work, but it doesn't :(.
Could you please help?
Thanks,
Shearer
Solved! Go to Solution.
Hi, @Shearer
We cannot refer to a measure in LOOKUPVALUE function. You can use function ‘’calculate“ and ”filter“ to replace function ”lookupvalue“
Please try measure formula like:
_last month = CALCULATE(MAX('table'[Month]),FILTER(ALL('table'),'table'[Volume Actuals]=1),'table'[Product]=MAX('table'[Product] ))
_New Actual Spend = CALCULATE(MAX('table'[Actual Spend]),FILTER(ALL('table'),'table'[Product]=MAX('table'[Product])&&'table'[Month]=[_last month]))
Best Regards,
Community Support Team _ Eason
Hi, @Shearer
We cannot refer to a measure in LOOKUPVALUE function. You can use function ‘’calculate“ and ”filter“ to replace function ”lookupvalue“
Please try measure formula like:
_last month = CALCULATE(MAX('table'[Month]),FILTER(ALL('table'),'table'[Volume Actuals]=1),'table'[Product]=MAX('table'[Product] ))
_New Actual Spend = CALCULATE(MAX('table'[Actual Spend]),FILTER(ALL('table'),'table'[Product]=MAX('table'[Product])&&'table'[Month]=[_last month]))
Best Regards,
Community Support Team _ Eason
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
114 | |
105 | |
79 | |
68 | |
63 |
User | Count |
---|---|
148 | |
107 | |
106 | |
82 | |
70 |