7 Replies Latest reply on Nov 1, 2018 12:12 PM by Connor Freeman

    Noob Calculated Field Syntax Question (2018.2.3)

    Connor Freeman

      Apologies for posting as I'm certain this has been asked many times before.

      I'm struggling with the transition from Excel to Tableau syntax, I think.


      I'm trying to get the percentage difference of a sum of unique measure values based on a string, or attribute, within a dimension.


      As an example –

      I’m pulling [event label] and [total events] from Google Analytics.

      I then split [event label] to get a set of more unique events. "Wall-shown" and "checkout-complete", in this case. Each event has corresponding total events in the measure values.

      I want to divide "checkout-complete" total events by "wall-shown" total events to get a conversion rate.


      eventname: "wall-shown"||action: "stop"||category: "block"||type: "paywall…

      eventname: "checkout-complete"||action: "completed"||category: "payment"||type: "paywall"||offers: {"te…


      In plain English, it would look like this –

      IF [event label] contains “wall-shown”, THEN SUM [total events] divided by IF [event label] contains “checkout-complete”, THEN SUM [total events].


      I get any of several varieties of errors when i attempt the calculated field.

      Happy to hear other criticisms. My first dashboard so I acknowledge I have far to go.