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
greenguy2012
Advocate I
Advocate I

DAX: Count where row value equals filter context

Hey there,

 

New to DAX so any help is appreciated. My goal is to understand how many customers cancel in a given sold date. Basically how many items did we sell in a given time period vs how many cancelled in that same period. 

 

What I'm trying to do is count the number of rows where [Cancel Date] column values equal the Pivot Table Row Context Date [Sold Date] grouped by Month. Ex Grouped by Jan Sold Month, 10 cancelled in same Jan period. 

 

Needed Pivot Table output:

 

Sold Month. |  Cancel Count

- Jan.  |   10

- Feb   |  15

- Mar   |  20

 

Hopefully thats clear. Thanks in advance for your help!

1 ACCEPTED SOLUTION
v-yulgu-msft
Microsoft Employee
Microsoft Employee

Hi @greenguy2012,

 

You can new a calculated column similar to:

Cancel Count =
CALCULATE (
    COUNT ( Table[Cancel Date] ),
    FILTER (
        ALLEXCEPT ( Table, Table[Sold Date].MONTH ),
        [Cancel Date] = [Sold Date]
    )
)

 

Add [Sold Date].Month and above column into table visual.

 

Regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
v-yulgu-msft
Microsoft Employee
Microsoft Employee

Hi @greenguy2012,

 

You can new a calculated column similar to:

Cancel Count =
CALCULATE (
    COUNT ( Table[Cancel Date] ),
    FILTER (
        ALLEXCEPT ( Table, Table[Sold Date].MONTH ),
        [Cancel Date] = [Sold Date]
    )
)

 

Add [Sold Date].Month and above column into table visual.

 

Regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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