Forum Discussion
Syndicate_Admin
Administrator
3 years agoLast purchase value
Hello tod@s, I have the following scenario and problem, with the following two measures: Measure Last Purchase Date: Fecha_Ultima_Compra = LASTNONBLANK(Calendar[Date],[Valor_Precio_Unit_Final]) ...
Anonymous
3 years agoNot applicable
Hi Syndicate_Admin ,
I created some data:
Here are the steps you can follow:
1. Create calculated table.
Calendar =
DISTINCT('Table'[Month])
2. Create measure.
Flag =
var _selectmonth=SELECTCOLUMNS('Calendar',"month",[Month])
var _selectitem=SELECTEDVALUE('Table'[item])
var _maxdate=MAXX(
FILTER(ALL('Table'),
'Table'[Month] in _selectmonth && 'Table'[item]=_selectitem&&'Table'[Month]=MAX('Table'[Month])),[Date])
return
IF(
MAX('Table'[Date]) =_maxdate,1,0)
3. Place [Flag]in Filters, set is=1, apply filter.
4. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly