Forum Discussion
Lookupvalue error same table working for some columns not all
- 5 years ago
Regarding your error, it is often caused by duplicate values.
Does this work?
CALCULATE(SUM('Magnitude'[Valeur]);FILTER('Magnitude';'Magnitude'[Key1]=EARLIER('Magnitude'[Key2])))If the problem persists, please share some sample data or sample pbix so that we can do more testing.
D1n2e3 , based on what I got. Create a table with year, period
and these new column
year period = [Year] *100 +[period]
Period Rank = RANKX(all('Period'),'Period'[year period],,ASC,Dense)
then try measures like
This Period = CALCULATE(sum('order'[Qty]), FILTER(ALL('Period'),'Period'[Period Rank]=max('Period'[Period Rank])))
Last Period = CALCULATE(sum('order'[Qty]), FILTER(ALL('Period'),'Period'[Period Rank]=max('Period'[Period Rank])-1))
Hello,
Thanks for your answer. I followed the steps (I liked a lot the Year period and Period Rank ideas). However, I don't have any value for the Last Period once in the matrix on the visualization:
I had the same issue originally but I thought that the slicer would only show the selected Period and therfore the Period - 1 would not appear.
Kind regards,
D1