Chart Dataset Expression, last row

Hi,

I have classic chart with dataset.
I would like Numeric Label to show value of the last row and column "Test History"in this dataset.

I tried to bind Numeric Label Value to this Expression:

{Root Container.Chart.Chart.TestHistory}[{Root Container.Chart.Chart.TestHistory.rowCount}, "Test History"]

But I get an Error: “Path ‘Root Container.Chart.Chart.TestHistory’ not defined”.

But if I use such Expression:

{Root Container.Chart.Chart.TestHistory}[1, "Test History"]

It works.

The question is, how to get last row from Chart’s Dataset?

Thanks!

Right, the chart doesn’t have a rowCount property. You need to do the following:try({Root Container.Chart.Chart.TestHistory}[len({Root Container.Chart.Chart.TestHistory.Data})-1, "Test History"], 0)Also, make sure to wrap it in a try function when no rows exist in the dataset.

Hi,

Does this still work. I am using 7.9.6 and my datasets don’t have a “Data” property either?

Yes this type of expression still works. It will work for any dataset. Can you provide more context or an example of what is not working?