Showing results for 
Search instead for 
Did you mean: 
Helper V
Helper V

Using TreatAs for Zendesk data

I am trying to build a report with Zendesk data. Since the connector from withing PBI Desktop is broken, I opened the data in an app and then connected from my powerbi desktop to the app, with a live connection. 


Now I can connect to the data model, but not change anything to the model. So I have a calendar table, and other tables that are not connected to the data table, see image.Capture.PNG


I want to show charts by month etc. , so to connect the measures to the Calendar table. I tried using TREATAS and FILTER functions, but to no avail. The Measures I write stay empty.

What I tried:

Test = 

CALCULATE(COUNT(Tickets[id]), TREATAS(VALUES('Calendar'[Date]),Tickets[created_at]))


This gave me an entirely empty table.
I also tried 

Test = 

CALCULATE(COUNT(Tickets[id]), TREATAS(SUMMARIZE('Calendar','Calendar'[Date]),Tickets[created_at]))

Also gave an empty table. What am I missing?

Community Support
Community Support

Hi @Laila92 ,


Based on my test,  your formula works well in lc mode. Would you please check if the data type of Ticket[create_at] is the same as Calendar[Date]?


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.


Best Regards,

Dedmon Dai

Super User IV
Super User IV

@remyo , Try measures like


Test =
var _min = minx(allselected('Calendar'),'Calendar'[Date])
var _max = minx(allselected('Calendar'),'Calendar'[Date])
CALCULATE(COUNT(Tickets[id]), filter(Tickets, Tickets[created_at] >= _min && Tickets[created_at] <= _max))




Test =
var _date = allselected('Calendar'[Date])
CALCULATE(COUNT(Tickets[id]), filter(Tickets, Tickets[created_at] in _date))

Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

@amitchandak this also gives a whole blank column.
@remyo yes, there are values in the id column

Responsive Resident
Responsive Resident

Have you checked if the is data in the tickets table ?

Have you checked if the is data in the calender table ?

Helpful resources

PBI User Groups

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

Top Solution Authors
Top Kudoed Authors