Forum Discussion
Count Calls (Inbound and Outbound) Yesterday
Hi, hopefully someone can help!
I want to include a visual in my report that shows the percetage of inbound vs outbound calls yesterday (thinking a pie or doughnut chart?)
I am struggling however to count and filter the data. The formula I am trying to use is:
Inbound Calls Yday = calculate(
countax(Inbound_Calls[StartDate]),
filter(Inbound_Calls, Inbound_Calls[StartDate] = [Yesterday]))
** Note, I have a measure in my date table [Yesterday] which is basically just Today()-1
The formula above returns 'Blank'
Please can someone tell me how I can count the calls yesterday?
Hi Aimeeclaird
try more easy
Inbound Calls Yday = calculate( counta(Inbound_Calls[StartDate]), Inbound_Calls[StartDate] = (TODAY()-1) )or
Inbound Calls Yday = calculate( counta(Inbound_Calls[StartDate]), Inbound_Calls[StartDate].[Date] = (TODAY()-1) )
3 Replies
- az38Community Champion
Hi Aimeeclaird
try more easy
Inbound Calls Yday = calculate( counta(Inbound_Calls[StartDate]), Inbound_Calls[StartDate] = (TODAY()-1) )or
Inbound Calls Yday = calculate( counta(Inbound_Calls[StartDate]), Inbound_Calls[StartDate].[Date] = (TODAY()-1) )- AimeeclairdHelper IV
Thanks for your help - appreciate you taking the time. Can I ask where I was going wrong please?
- az38Community Champion
first, countaX() has another syntax - COUNTAX(<table>,<expression>) https://docs.microsoft.com/en-us/dax/countax-function-dax
second, FILTER in measure uses row context, so you need use FILTER(ALL(Table),..)
third, as you have the only simple expression over all amount of data it is not mandatory to use filter, you could filter out useful falues just by CALCULATE(<expression>,<filter1>,<filter2>…)