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

Get Fabric certified for FREE! Don't miss your chance! Learn more

Reply
timward10
Helper II
Helper II

Formula

Hi, 

 

I am trying to pull back the count of the account in another table, but also include a filter to select the date. 

 

Currently for the count, it is just bringing back a total instead of it being related to the 'name' column, this is before I have tried to add in the date name. The reference for the date name is year month in the event table.  

 

timward10_0-1747226872301.png

Can anyone help please? 

 

Thanks 

 

 

1 ACCEPTED SOLUTION

You could use

Jan'25 =
CALCULATE (
    COUNTROWS ( Event ),
    FILTER (
        Event,
        Event[Account Name] = Test[Name]
            && Event[Activity Date (Month Year)] = "Jan 2025"
    )
)

View solution in original post

3 REPLIES 3
timward10
Helper II
Helper II

Perfect, that has worked! 

 

How do I add another filter into the same query to only return anything with a January date? I have a column in the event table called Month Year so I can reference that. 

 

Using the below but it won't work with the second part of the filter. 

 

Jan'25 = CALCULATE(
    COUNTROWS(Event),
    FILTER(Event,Event[Account Name]
    =(Test[Name],
    Event,Event[Activity Date (Month Year)]
    ="Jan 2025")))

 

Thanks!

You could use

Jan'25 =
CALCULATE (
    COUNTROWS ( Event ),
    FILTER (
        Event,
        Event[Account Name] = Test[Name]
            && Event[Activity Date (Month Year)] = "Jan 2025"
    )
)
johnt75
Super User
Super User

As you're creating a calculated column you have a row context, not a filter context, and SELECTEDVALUE only works in a filter context. Just replace the SELECTEDVALUE with Test[Name] and it should work.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

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.