Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
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.
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?
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
@Anonymous , Try measures like
Test =
var _min = minx(allselected('Calendar'),'Calendar'[Date])
var _max = minx(allselected('Calendar'),'Calendar'[Date])
return
CALCULATE(COUNT(Tickets[id]), filter(Tickets, Tickets[created_at] >= _min && Tickets[created_at] <= _max))
or
Test =
var _date = allselected('Calendar'[Date])
return
CALCULATE(COUNT(Tickets[id]), filter(Tickets, Tickets[created_at] in _date))
@amitchandak this also gives a whole blank column.
@Anonymous yes, there are values in the id column
Have you checked if the is data in the tickets table ?
Have you checked if the is data in the calender table ?
User | Count |
---|---|
127 | |
108 | |
100 | |
63 | |
62 |
User | Count |
---|---|
136 | |
113 | |
102 | |
71 | |
60 |