Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
 
					
				
		
Hi all,
I need to create a new column due to the following scenario:
At the end is to move the cuantities one month less in the Sales Date. I was trying with Lookupvalue but it didn't work.
I hope you can help me thanks.
Solved! Go to Solution.
@romero01 , Try
sumx(filter( Table, [Product]-earlier([Product]) && [Customer]-earlier([Customer]) && [StockDate]-earlier([SalesDate] ),[ventas])
O
sumx(filter( Table, [Product]-earlier([Product]) && [Customer]-earlier([Customer]) && [SalesDate]-earlier([StockDate] ),[ventas])
@romero01 , Try
sumx(filter( Table, [Product]-earlier([Product]) && [Customer]-earlier([Customer]) && [StockDate]-earlier([SalesDate] ),[ventas])
O
sumx(filter( Table, [Product]-earlier([Product]) && [Customer]-earlier([Customer]) && [SalesDate]-earlier([StockDate] ),[ventas])
Hi @Greg_Deckler I was testing the qurey but seems is saying to me that the parameter is not correct type.
Hi @amitchandak I think we are close 🙂 but only is showing one result or maybe only is taking the first one.
Attached the link with the powerbi document. Whith both querys.
I hope yu can help me thanks.
Hi @Anonymous ,
Could you please provide the correct value of field [WhatIWant] base on your current sample data and the calculation logic? Thank you.
Best Regards
Rena
@Anonymous I had a syntax error, maybe:
What I Want =
  MAXX(
    FILTER(
      'Table',
      [Product]=EARLIER([Product]) &&
        [StockDate]=EARLIER([SalesDate]) &&
          [Customer]=EARLIER([Customer])
    ),
    [Stock]
  )@Anonymous Maybe:
What I Want =
  MAXX(FILTER('Table',[Product]=EARLIER([Product])&&[StockDate]=EARLIER([SalesDate]&&[Customer]=EARLIER([Customer])),[Stock]) 
					
				
				
			
		
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
 
            | User | Count | 
|---|---|
| 80 | |
| 49 | |
| 35 | |
| 31 | |
| 30 |