20 Sep 2024 10:45 PM
"Good afternoon, I require your assistance with a Data Explorer query. I have two fields within the dimensions that I'd like to use for mathematical operations. Could you please help me understand how to perform calculations with data from within these dimensions?"
111996- 111994= 2 example
thanks
21 Sep 2024 12:12 PM
Hello @carlos_carreno
Switch to advanced mode and apply the required mathematical calculations.
Regards,
22 Sep 2024 02:23 PM
Thank you for the guidance. However, I'm struggling to capture individual data from the dimension to perform the mathematical operation. Could you please help me extract these two dimensions?
com.dynatrace.extension.sql-oracle.dataguard.seqDifference:splitBy("destination.type",destination,"database.mode","recovery.mode","gap.status","instance.name","database.type",device,"dt.entity.sql:com_dynatrace_extension_sql-oracle_instance","primary.current.seq","primary.archived.seq","standby.applied.seq"):names:sort(dimension("primary.current.seq",descending)):limit(1)
"primary.current.seq" - "standby.applied.seq"
How would the syntax be, since I've searched in the documentation and haven't found the way?
Thanks
23 Sep 2024 08:28 AM
Arithmetic expressions in advanced mode cannot be applied to dimension values, they can be applied only to metric values. Unfortunately.
Just a reminder - dimensions should not have high cardinality and if you send volatile values for dimension, you may run into cardinality limit very soon.
23 Sep 2024 08:34 AM
Can I suggest you create different metrics for the current sequence and the applied seq?
This will let you do the maths.