Forum Discussion
Extract last data from a month
So, Anonymous the solution with summarized table doesnt satisfy you?
try a measure like
Measure = calculate(lastnonblank('total base'[Inventario],1). allexcept('total base','total base'[Fecha]))then in visual leave onle month-member of 'total base'[Fecha] hierarchy
do not hesitate to give a kudo to useful posts and mark solutions as solution
Still not working
- az386 years agoCommunity Champion
Anonymous
add .[Month]
Measure = calculate(lastnonblank('total base'[Inventario],1), allexcept('total base','total base'[Fecha].[Month]))looks like this
do not hesitate to give a kudo to useful posts and mark solutions as solution
- Anonymous6 years agoNot applicable
Hi, az38 and thank you for your time and patience.
Your last solution should have worked, but it has not. I don't know if there is a problem with the way that power bi sum the inventories in each week.
inv final mes = calculate(lastnonblank('total base'[Inventario],1), allexcept('total base','total base'[Fecha].[Month]))- az386 years agoCommunity Champion
Hi Anonymous
at last, i got it 🙂
1. create a calculated column (not measure) in 'total base' table
r = RANKX( filter('total base';'total base'[Fecha].[Month]=earlier('total base'[Fecha].[Month]) && not(isblank('total base'[Inventario])));'total base'[Fecha];;DESC)2. create a measure in 'total base' table
inv final mes = calculate(lastnonblank('total base'[Inventario];sum('total base'[Inventario])); allexcept('total base';'total base'[Fecha].[Month]);'total base'[r]=1)next, leave only Month in Fecha hierarchy inside your visual
do not hesitate to give a kudo to useful posts and mark solutions as solution