Forum Discussion
Dynamic column headings - based on todays date
Naverie Only way I can think of is to have your table headers in a disconnected (maybe connected) table so that it recalculates at refresh. Then use these columns. So, for example:
Table =
DATATABLE(
"Heading",STRING,
{
{"D" & FORMAT(TODAY(),"dd/MM")},
{"D+1" & FORMAT(TODAY()+1,"dd/MM")},
{"D+2" & FORMAT(TODAY()+2,"dd/MM")}
}
)
Greg_Deckler thank you for your response.
I've just tried that and am getting this error:
The tuple at index '1' from the table definition of the DATATABLE function does not have a constant expression in the column at index '1'.
I have pasted it into a measure exactly as it is. Is that correct?
Thanks
- Greg_Deckler5 years ago
Community Champion
Naverie Oh yeah, DATATABLE... Try a straight table constructor:
Table 4 = { "D" & " " & FORMAT(TODAY(),"dd/MM"), "D+1" & " " & FORMAT(TODAY()+1,"dd/MM"), "D+2" & " " & FORMAT(TODAY()+2,"dd/MM") }- Naverie5 years ago
Helper I
I am having a right mare with this 😂
Am now getting this and the table not loading?
A table with multiple values was supplied where a single value was expected
- Greg_Deckler5 years ago
Community Champion
Naverie The formula is for a table. So you need to go to Modeling tab, click New Table and then enter the formula. This will not work for a column or measure.