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

Try your skills in the Power BI Dataviz World Championship! Round one ends June 26. Join now

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
Fabric Data Days is here Carousel

Fabric Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.