What would be the best approach if I wanted to programatically show the current year and its months on the top column?
Having issue setting the year on the filter programmatically.
Hello,
Thank you for the question.
We recommend using the filter by condition for date fields to show the records with the current year. Kindly note that it is supported for date fields. You can check by clicking on the date field filter and seeing if there is a "Filter by Dates" option.
To set the filter programmatically, you can use the following code (only supported for the date fields):
report: {
slice: {
rows: [
{
uniqueName: "[Date].[Date]",
filter: {
query: {
current: "year"
}
}
}
],
... // other properties
}
... // other properties
}
Please let us know if it works for you. Looking forward to hearing from you.
Kind regards,
Nadia