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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
domiowa
Frequent Visitor

Count if

Hi everyone

I have a table with my start and ending date, I'd like to make a count if in another table with month

So I have no problem to do that on Excel but on power Bi, it's impossible

First I have to make a relation between my two table but nothing has change I can't reach my goal

 

Any idea?

 

Untitled.png

 

Thanks in advnace

 

6 REPLIES 6
Greg_Deckler
Community Champion
Community Champion

A bit tough to decipher, but the equivalent in Power BI for COUNTIF is CALCULATE with a FILTER clause and you could use something like LOOKUPVALUE or SEARCH or RELATEDTABLE or RELATED or something along those lines. Can't really get a sense of you raw data. 



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Thank for your quick answer

So the idea is is to compare my month with end and start date

First Case: Sumif((StartDate < Month) AND end Date => Month +1))

And all my calculation are similar to this case

But what does the data look like? I get there is a start date and an end date, but where is MONTH coming from? Is that current month or is that coming from another table??



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Month come from my table project with project name and ending date and start date

So this is what I'd like to do but automatically:

Mesure 2 = Calculate(count(TabJalons[Jalon]);(TabJalons[Starting Date]<DATE(2016;10;1));(TabJalons[Ending Date]>=date(2016;11;01)))

I'd like to get my Date(2016,10,1) et Date(2016,11,1) directly from a table

Hi @domiowa,

You said "I'd like to get my Date(2016,10,1) et Date(2016,11,1) directly from a table" Let's assume the table name is Date, what the table look like? There is relationship between 'Date' and 'TabJalons', what's the relationship? Could you please share more details or .pbix file for further analysis?

Thanks,
Angelia

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

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.