I can't seem to understand how timestamps are represented internally in visual overviews. I'm trying to use datetime and timestamp values but I don't really find it intuitive.
I have a parameter containing a timestamp and I want to see if this time has passed or not use that boolean as a conditional to show or hide a shape. Nothing happens when using
<A>-A|127701/259|307:[tableindex]|>[DataMinerTime]
When adding a text shape with the placeholder
[Subtract:[Param:127701/259,307,[tableindex]],[DataMinerTime]]this shows correctly. For example if the time has passed it shows -01:00:00. However when trying to do
<A>-A|Value|[Subtract:[Param:127701/259,307,[tableindex]],[DataMinerTime]]|>0
or
<A>-A|Value|[Subtract:[Param:127701/259,307,[tableindex]],[DataMinerTime]]|Regex=^[\d:]+
neither works.
I tried setting it up locally and it works as expected here with your final example. Your regex matches everything that contains ONLY a number or ':', meaning that if you use it as a Hide condition it will NOT SHOW all the positive timespans.
An even simpler regex for this would just be "-" though. If I set this as my Hide shape data, all positive results are hidden:
<A>-A|Value|[Subtract:[DataMinerTime],[Param:Data Insights,820,[tableindex]]]|Regex=-
If you are still encountering issues, feel free to reach out for some further investigation (maybe with sharing a dmimport package and your DMA version?).
Thanks. Overlooked that part. But the regex comparison and the subtract in the extended condition definitely do work.
Indeed, although using a regular expression is less straight forward for this use case.
Good catch with the separator and the simpler regex! What seemed to be missing (not really sure why) was adding the shape data fields View: [this view] and Enabled: False.
The dash is used as a separator for multiple parts of your condition, you’ll need to change it using the [Sep:XY] syntax in order for this to work.