Forum Discussion
Last 5 items and average per row
Hello!!! I need your help!!
I have the following table
I need to create a dax measurement that calculates the percentage of the average for each row. I tried several times and it seems simple but it doesn't work out.
On the other hand I need to create a measure that indicates the average percentage of the last accounting years that is, it must contain the Ejc 56 to EjC52 but it must be dynamic so that when new ones are added I take them into account.
If you can help me please!!!
Thanks a lot.
5 Replies
- ryan_mayu
Super User
you can try this
Measure =VAR _max=max('Table'[YEAR])VAR _min=_max-4return averagex(FILTER('Table','Table'[YEAR]>=_min&&'Table'[YEAR]<=_max),'Table'[VALUE])if the year column can't be used, you can create an index columnpls see the attachment below- Syndicate_Admin
Administrator
Hello, thanks for replying!.
My table doesn't have a date column, so I can't use the measurement that happens to me.
Thank you. - Syndicate_Admin
Administrator
Hello!! I couldn't fix my problem but his answer gave me a guide, but I'm still with the problem. I'm going to post again with the pbi file to make it better understood. Thank you.
- Syndicate_Admin
Administrator
Hello, someone who can help me? Grs
- ryan_mayu
Super User
can you use the second column? It looks like year column.
If that column is not continuous number, you can use an index column and use index column to calculate.