Forum Discussion
data for last N run ids
my data looks like this
grade id, run id, timestamp, categoryid, measurevalue, speedvalue,
i need to create a following measure, which will show all values for measurevalue with following condition, what is the best way to do it?
1- pick last 5 runs (run ids are usually incremental ids)
2- where categoryid = xyz
3- where grade id = abc
4- where speed value > 150
The final measure depends on your Matrix.
The Top 5 table can be calculated like this:
=
TOPN (
5,
CALCULATETABLE (
Data,
Data[categoryid] = "xyz",
Data[grade id] = "abc",
Data[speed value] > 150
),
Data[run id], DESC
)
1 Reply
- LivioLanzo
Solution Sage
The final measure depends on your Matrix.
The Top 5 table can be calculated like this:
=
TOPN (
5,
CALCULATETABLE (
Data,
Data[categoryid] = "xyz",
Data[grade id] = "abc",
Data[speed value] > 150
),
Data[run id], DESC
)