cancel
Showing results for
Did you mean:
Highlighted
Frequent Visitor

## What is the Substitute for COUNTIFS date based formula in Power BI ?

So I have this formula in excel in my raw data (not separate totals field)

`=COUNTIFS([Date range],">="&(EOMONTH(Date,-1)+1),[Date range],"<="&EOMONTH(Date,0))`

Power BI however doesn't have this function. I tried to use Calculate, but it is still confusing for me to understand some of these formulas.
Can you please show me the substitute for this formula in Power BI ?

3 REPLIES 3
Established Member

## Re: What is the Substitute for COUNTIFS date based formula in Power BI ?

Hey @szakharov ,

this would be the solution for your formula.

```RowCount :=
COUNTROWS ( FILTER ( TableWithDateColumn, DateColumn >= X && Datecolum <= X ) )```

If this post was helpful may I ask you to mark it as solution and give it some kudos?

Have a nice day!

BR,
Josef

Frequent Visitor

## Re: What is the Substitute for COUNTIFS date based formula in Power BI ?

Hey, @JosefPrakljacic

So what is X in your case ?

Because in my case I use EOMONTH formula, and I doesn't seem you found a solution to it.

I will try to do something with what you provided, but cannot mark it as solution, because it doesn't answer my question.

Established Member

## Re: What is the Substitute for COUNTIFS date based formula in Power BI ?

```RowCount :=
COUNTROWS ( FILTER ( TableWithDateColumn, DateColumn >= EOMONTH(DateColumn,The number of months before or after the start_date) && Datecolum <= EOMONTH(DateColumn, The number of months before or after the start_date) ) )```

Announcements

#### Challenge: Can You Solve These?

Find out how to participate in the first Power BI 'Can You Solve These?' challenge.

#### Community News & Announcements

Get your latest community news and announcements.

#### Microsoft Business Applications October Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

#### Win Power BI Swag with Community Kudopalooza!

Each week, complete activities and be qualified in the drawing for cool Power BI Swag.

Top Kudoed Authors
Users Online
Currently online: 394 members 3,769 guests
Recent signins: