Forum Discussion
Show Latest Value & Last N Values
- 8 months ago
Hi AnonymousEngi,
As per my understanding, you want to display Latest Value & Last N Values, based on my understanding I treid to come up with a solution in the below pbix file.Show Latest Value & Last N Values.pbix
Please check the above pbix file. Hope this help to solve the problem. Please let me know if you have any further questions or need clarifications.
If this reply helped solve your problem, please consider clicking "Accept as Solution" so others can benefit too. And if you found it useful, a quick "Kudos" is always appreciated, thanks!
Best Regards,
Maruthi
Actually, there is a problem; I have ported over the same measures you used to my dataset (which is very large, not sure if that has an impact). Some of "Last N Grades" only shows 2 or three results when there are actually 5. I will note that I have not sorted my data to any capacity, and there are older sets.
Additionally, some of the order for Last N Grades seems to be out of order. One section which I know is meant to show
A<A<A<A<A<A<A<A<B<A<B does instead
A<A<A<A<A<B<A<A<B<B<A
Would there be any obvious first thoughts as to why?
Turns out it is helpful if you apply a transform to your data that makes dates not be formatted as text. My apologies for any and all confusion. To Others interested I did use a different formula in the end as follows:
Last N Eval =
VAR _LastN =
TOPN(
SELECTEDVALUE('Nther Table'[N]),
FILTER(
ALL(Data),
Data[tree#] = SELECTEDVALUE(Data[tree#]) && Data[branch#] = SELECTEDVALUE(Data[branch#])
),
Data[dateReported],
DESC
)
RETURN
IF(
COUNTROWS(_LastN) > 0,
CONCATENATEX(
_LastN,
Data[grade],
" > ",
Data[dateReported],
DESC
),
""
)