Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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 ?
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
95 | |
76 | |
65 | |
51 |
User | Count |
---|---|
146 | |
109 | |
106 | |
88 | |
61 |