Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Aimeeclaird
Helper IV
Helper IV

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? 

 

 

1 ACCEPTED SOLUTION
az38
Community Champion
Community 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)
)

do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

View solution in original post

3 REPLIES 3
az38
Community Champion
Community 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)
)

do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

Thanks for your help - appreciate you taking the time. Can I ask where I was going wrong please? 

az38
Community Champion
Community Champion

@Aimeeclaird 

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>…)


do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.