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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Ayelet
Frequent Visitor

Calculate with filter date value greater then date measure

Hi experts:)

we are onboarding customers to use self service orders app.

I have this Sales table and i'm trying to calculate for each customer how many orders he placed NOT from the App since he was onboarded.

customerorder dateapp order
111101/05/2023yes
111122/05/2023no
111103/06/2023yes
111201/04/2023yes
111215/04/2023no
111210/06/2023no
111310/07/2023no
111419/05/2023yes
111410/10/2023no
111401/11/2023yes
111419/12/2023no

 

what i did was:

measure 1: 

App start date = calculate (min(Sales[order date]) , Sales[app order]="yes")

 

measure 2:

now i want to count the number of orders "not from app" since app start date for each customer:

orders since app = calculate(count(Sales[order date]),Sales[app order]="no",Sales[order date]>[App start date])

 

i get this error for measure 2 :

A function ‘calculate‘ has been used in a True/False expression that is used as a table filter expression. This is not allowed.

which i believe refers to this part:   Sales[order date]>[App start date]

 

how should i write this measure?

 

thank you

1 ACCEPTED SOLUTION
Fowmy
Super User
Super User

@Ayelet 

orders since app =
VAR __appstartdate = [App start date]
RETURN
    CALCULATE (
        COUNT ( Sales[order date] ),
        Sales[app order] = "no",
        Sales[order date] > __appstartdate
    )
Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

View solution in original post

2 REPLIES 2
Ayelet
Frequent Visitor

@Fowmy that worked! thank you very much!

Fowmy
Super User
Super User

@Ayelet 

orders since app =
VAR __appstartdate = [App start date]
RETURN
    CALCULATE (
        COUNT ( Sales[order date] ),
        Sales[app order] = "no",
        Sales[order date] > __appstartdate
    )
Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors