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

View all the Fabric Data Days sessions on demand. View schedule

Reply
MSuser5
Helper III
Helper III

Find Customer count those not received amount

Hi All,

 

I have raw data which is contains customers monthly amount, In this i want to find how many customers received amount first quarter(Q1) and in those customers who haven't get amount in second quarter(need count of customers)

example source data:

Source data.PNG

 

Expected Result:

Result.PNG

 

Kindly sugget how to create measure 1 and measure 2 as results.

 

Thanks,

MS

1 ACCEPTED SOLUTION
danextian
Super User
Super User

Hi @MSuser5 ,

 

First off, when you post a sample, please post one that be easily copy-pasted (not an image). The community wants to help but make it easy for us to help you by not making us manually type the data. I had to use an OCR to avoid most of the manual stuff.

Going back, your data is not in the best format for reporting. I''d unpivot everything except Customer column in Power Qurery before creating measures. Change the data type accordingly after unpivoting. Load the data and then create the measures.  See below:

Customers with amount received in Q1 = 
CALCULATE (
    DISTINCTCOUNT ( 'Table'[Customer] ),
    FILTER ( FILTER ( 'Table', QUARTER ( 'Table'[Date] ) = 1 ), 'Table'[Value] > 0 )
)
Customers with amount received in but not in Q2 = 
VAR q1 =
    //summary of customers that received in Q1
    SUMMARIZE (
        FILTER ( 'Table', NOT ( ISBLANK ( [Customers with amount received in Q1] ) ) ),
        'Table'[Customer]
    ) //summary of customers that received in Q2
VAR q2 =
    SUMMARIZE (
        FILTER ( FILTER ( 'Table', 'Table'[Value] > 0 ), QUARTER ( 'Table'[Date] ) = 2 ),
        'Table'[Customer]
    )
RETURN
    //removes the customer that are in q1 based on the summary in q2 and then counts the remaining ones
    COUNTROWS (
        EXCEPT ( q1, q2 )
    )

 

danextian_0-1689227833852.png

Please see sample pbix.

 

 





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

View solution in original post

3 REPLIES 3
danextian
Super User
Super User

Hi @MSuser5 ,

 

First off, when you post a sample, please post one that be easily copy-pasted (not an image). The community wants to help but make it easy for us to help you by not making us manually type the data. I had to use an OCR to avoid most of the manual stuff.

Going back, your data is not in the best format for reporting. I''d unpivot everything except Customer column in Power Qurery before creating measures. Change the data type accordingly after unpivoting. Load the data and then create the measures.  See below:

Customers with amount received in Q1 = 
CALCULATE (
    DISTINCTCOUNT ( 'Table'[Customer] ),
    FILTER ( FILTER ( 'Table', QUARTER ( 'Table'[Date] ) = 1 ), 'Table'[Value] > 0 )
)
Customers with amount received in but not in Q2 = 
VAR q1 =
    //summary of customers that received in Q1
    SUMMARIZE (
        FILTER ( 'Table', NOT ( ISBLANK ( [Customers with amount received in Q1] ) ) ),
        'Table'[Customer]
    ) //summary of customers that received in Q2
VAR q2 =
    SUMMARIZE (
        FILTER ( FILTER ( 'Table', 'Table'[Value] > 0 ), QUARTER ( 'Table'[Date] ) = 2 ),
        'Table'[Customer]
    )
RETURN
    //removes the customer that are in q1 based on the summary in q2 and then counts the remaining ones
    COUNTROWS (
        EXCEPT ( q1, q2 )
    )

 

danextian_0-1689227833852.png

Please see sample pbix.

 

 





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

Hi @danextian ,

 

Thanks for the solution and guidance .. It's working fine!!

MSuser5
Helper III
Helper III

Hi All,

Any suggesstions / Solutions please

 

Thanks ,

MS

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