0

Unable to Calculate YoY Growth

I have a SQL table with a date column and a metric column (which I want to calculate growth). 

I joined the main table with date dimension table (date=date). Now I created a alias for the main table and again joined with date dimension table (date=yearagodate).

In viz, I can pull year (from Date dim), metric(from main table), YearAgo metric(from alias table). 

Results are matching. But I cannot make difference for growth calculation. 

i.e., (metric-metric1)

 

Can you guys help me with this?

2replies Oldest first
  • Oldest first
  • Newest first
  • Active threads
  • Popular
  • Try sum(metric1)  - sum(metric2)

    Reply Like
      • Gautham
      • Cittabase
      • Gautham
      • 3 mths ago
      • Reported - view

      Amit Kothari  Thanks :) It worked!

      Reply Like
Like Follow
  • Status Answered
  • 3 mths agoLast active
  • 2Replies
  • 37Views
  • 2 Following