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
Anonymous
Not applicable

Combine COUNTROWS with DISTINCTCOUNTNOBLANK

I have below formula counting the selected criteria.

 

 

= CALCULATE(       
  COUNTROWS(visits),
  visits[Status] =  "completed",
  visits[Maint topic] IN  {"visit", "online meeting", "webinar", "joint visit"},
  visits[Main Target Group (Regarding)] = "Installer/Contractor"
)
      

 

Finally, I would add DISTINCTCOUNTNOBLANK to count unique values. - this is the part that troubles me.

 

= CALCULATE(       
  COUNTROWS(visits),
  visits[Status] =  "completed",
  visits[Maint topic] IN  {"visit", "online meeting", "webinar", "joint visit"},
  visits[Main Target Group (Regarding)] = "Installer/Contractor",
  
  DISTINCTCOUNTNOBLANK(visits[Regarding Account])
)

 

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , What are you trying to achieve in the second?

 

try like

= CALCULATE(       
   DISTINCTCOUNTNOBLANK(visits[Regarding Account]),
  visits[Status] =  "completed",
  visits[Maint topic] IN  {"visit", "online meeting", "webinar", "joint visit"},
  visits[Main Target Group (Regarding)] = "Installer/Contractor"
)

 

 

View solution in original post

1 REPLY 1
amitchandak
Super User
Super User

@Anonymous , What are you trying to achieve in the second?

 

try like

= CALCULATE(       
   DISTINCTCOUNTNOBLANK(visits[Regarding Account]),
  visits[Status] =  "completed",
  visits[Maint topic] IN  {"visit", "online meeting", "webinar", "joint visit"},
  visits[Main Target Group (Regarding)] = "Installer/Contractor"
)

 

 

Helpful resources

Announcements
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.