I am importing data from a spreadsheet with contains many columns, two of which are Address (which returns the URL of the page) and Canonical Link Element 1 (which returns the canonical URL).

I wish to do a simple Boolean for whether or not the Address field and Canonical Field are the same so I can do a simple pie chart showing the percentage of Canonical URLs and Non-canonical URLs.

After reading the documentation on the CASEfunction, I tried the following formula:

CASE WHEN Address = Canonical Link Element 1 THEN 'Canonical Page' ELSE 'Non-Canonical Page' END

But I am unable to get this formula to work.

enter image description here

  • To the close voters: There are only 11 questions on Stack Overflow flagged with google-data-studio. Could someone explain why this would be on-topic there versus here? – jonsca Dec 20 '16 at 3:02
  • @jonca It is relatively new software, but I purposely choose this Stack Exchange website because it seemed most consistent with the Google Suite of Products i.e. [google-spreadsheets]. – inkovic Dec 20 '16 at 22:28
  • I agree. I have voted to leave it open here. – jonsca Dec 20 '16 at 23:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.