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
That_Analyst
Employee
Employee

Count blanks

I want to get the count of Customers from June that were not seen in July.

So Count of customers that had sales in June but not in July. 

=DISTINCTCOUNT(CustomerId_June),CustomerId_July=blank()

When I use the above formula, CustomerId 1 and 2 are returned instead of just CustomerId 2. 

If a customer had sales in July I do not want to include them, I only want those who had sales only in June.

That_Analyst_0-1663739547740.png

I've also tried adding a flag if(CustomerId_July=blnak(),1,0) but I still did not get the desired results.

 

1 REPLY 1

Hi @That_Analyst ,

 

You could try creating a column with -

Flag = VAR firstid =
    FIRSTNONBLANK ( 'Table'[ID_June], "" )
VAR compare =
    CALCULATE (
        COUNTROWS ( 'Table' ),
        FILTER ( ALL ( 'Table' ), 'Table'[ID_July] = firstid)
    )
RETURN
    IF ( ISBLANK ( compare ), 0, compare )
 
Then create a measure for count as -
Count = CALCULATE(DISTINCTCOUNT('Table'[ID_June]),FILTER('Table',[Flag]=1))
 
Hope this helps!
 
Regards,
Veena.

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

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

MayPowerBICarousel

Fabric Monthly Update - May 2024

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

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.