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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Countifs in PowerBI

Hello 

 

I have a formula in Excel's Power Query:
=COUNTIFS(Append1!$BF:$BF,">=01/01/2020",Append1!$BF:$BF,"<18/11/2022",Append1!$D:$D,"<>24 Application withdrawn")

I wish to convert it into the formula in PowerBI's Power Query.

Please advise as I find the DAX language in PB is really confusing.


4 REPLIES 4
Anonymous
Not applicable

Here is my syntax and the photo showing the red highlight is attached:Picture1.png

Start_on_site =
COUNTROWS(    
    FILTER(
        'Weekly Report Template',
        'Weekly Report Template'[Caseworker Start on Site Date]>=DATE(2020,1,1)
            &&'Weekly Report Template'[Caseworker Start on Site Date]<DATE(2022,11,18)
    ))
FreemanZ
Super User
Super User

With DAX, you create a measure like this:

Count :=
COUNTROWS(    
    FILTER(
        Append1,
        Append1[Column]>=DATE(2020,1,1)
            &&Append1[Column]<DATE(2020,11,18)
    )
)
 
BTW, Power Query uses another language call M language and it is different from DAX.
Anonymous
Not applicable

Thank you.  I tried the syntax and it worked but there is a red highlight/column in the slider on the right of the formula bar.

What does it indicate?  I think there is an error somewhere in the syntax but it calculated and produced the correct result.

I am puzzled.


can you make a snapshot?

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.