First Time Guests YTD
Using the Dynamic Data block under the reporting section you can use the following to add a widget to your Rock installation.
the query from above:
SELECT COUNT(*) AS [Count]
FROM Person P
INNER JOIN AttributeValue AV ON AV.EntityId = P.Id
INNER JOIN Attribute A ON A.Id = AV.AttributeId AND A.[Key] = 'FirstVisit'
WHERE DATEPART(year, AV.ValueAsDateTime) = '2017'
The formatted output from above:
<div class="col-md-12">
<div class="panel panel-block">
<div class="panel-heading">
<h4 class="panel-title">First Time Visitors YTD</h4>
</div>
<div class="panel-body">
<p style="font-size: 48px; text-align: center;">{% for row in rows %} {{ row.Count }} {% endfor %}</p>
</div>
</div>
</div>