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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
poweruser55
Helper IV
Helper IV

Count how many dates are less than

Capture.PNG

I am getting a syntax error I want it to count how many times when the expected installation date is less than the OLI close date

1 ACCEPTED SOLUTION
VahidDM
Super User
Super User

Hi @poweruser55 

 

Try this:

 

Var _A =
CALCULATE (
    COUNTROWS ( '999 Funnel' ),
    FILTER (
        '999 Funnel',
        '999 Funnel'[Expected Installation Date] < '999 Funnel'[Oli.Close Date]
    )
)

 

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
LinkedIn: 
www.linkedin.com/in/vahid-dm/

 

 

View solution in original post

2 REPLIES 2
VahidDM
Super User
Super User

Hi @poweruser55 

 

Try this:

 

Var _A =
CALCULATE (
    COUNTROWS ( '999 Funnel' ),
    FILTER (
        '999 Funnel',
        '999 Funnel'[Expected Installation Date] < '999 Funnel'[Oli.Close Date]
    )
)

 

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
LinkedIn: 
www.linkedin.com/in/vahid-dm/

 

 

Works perfect.. Could you also look at this one https://community.powerbi.com/t5/Desktop/AND-OR-Statements-in-DAX/m-p/2342831#M845048 it is much more complex and I am having issues @VahidDM 

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

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

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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