====== How to format timestamps in charts ====== If you want to create an own metric you can do so with the following steps: 1. Click on explore data on any chart {{:advanced_transformations:2021-09-01_11-17.png?600|}} 2. Click on edit data set {{:advanced_transformations:custom_metrics_2.png?600|}} 3. Create the formula and add the formula for the metric In this case we are summing up all conversions (markov) from types where the column type (conversion name) ends with install. More information on [[https://www.postgresql.org/docs/current/functions-matching.html|pattern matching in SQL]] SUM(CASE WHEN type like '%install' THEN markov END) Alternatively a cost per install would be calculated as follows: SUM(totalcost)/COUNT(DISTINCT type)/NULLIF(SUM(CASE WHEN type like '%install' THEN markov END),0) {{:advanced_transformations:custom_metrics_3.png?600|}} Then click save 4. Use the formula in your charts {{:advanced_transformations:custom_metrics_4.png?600|}}