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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.