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.

Screen Shot 2017-09-02 at 12.43.26 PM.png

Screen Shot 2017-09-02 at 12.47.05 PM.png

Screen Shot 2017-09-02 at 12.47.12 PM.png

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>


HELP