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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
PBIX_COACH
Helper II
Helper II

Count if date field have corresponding value

Hello Team I need some help with a Dax solution. I am trying to get test 1 measure to indicate if column b has at least 1 value in it and if not it should remain blank or 0. once I have that I should be able to then divide Test 1 results by the weeks in the period column to get an Engagement %. 

 

Current formula (not working)

 

Test1 = COUNTROWS (
    FILTER (
        VALUES ( CalendarDim[Start of Week]),
        CALCULATE ( COUNT ( '03 Contact '[B])>1 )
    )
)
 
Screenshot 1.pngScreenshot 2.png
 
Any assistance is truly appreciated

 

 

4 REPLIES 4
PBIX_COACH
Helper II
Helper II

Any help is appreciated I think it's a simple solution but I'm missing something simple

hi @PBIX_COACH 

your screenshot seems like a table visual. could provide some raw dataset?

SamInogic
Super User
Super User

Hi @PBIX_COACH ,

 

As per our understanding you are looking for a measure which will have following DAX Expression:

Test 1 = IF(COUNT('sample Table'[B])>=1,1,0)

These results as you said, if Column [B] doesn't have any value so measure should be blank or 0,

SamInogic_0-1678338817332.png

After this you also want to Divide result by the [Week in period], For this we can create a Measure which will store the Value of [Week in period]

weeks in period_Messure = max('sample Table'[Week in period])

After this Use below DAX Expression for Divide,


Weekly Engagement % = DIVIDE([Test 1],[weeks in period_Messure],1)

 

SamInogic_1-1678338840502.png

 

If this answer helps, please mark it as Accepted Solution so it would help others to find the solution.


Thanks!

Inogic Professional Service Division

An expert technical extension for your techno-functional business needs

Power Platform/Dynamics 365 CRM

Drop an email at crm@inogic.com

Service:  http://www.inogic.com/services/ 

Power Platform/Dynamics 365 CRM Tips and Tricks:  http://www.inogic.com/blog/

Inogic Professional Services: Power Platform/Dynamics 365 CRM
An expert technical extension for your techno-functional business needs
Service: https://www.inogic.com/services/
Tips and Tricks: https://www.inogic.com/blog/

hi @SamInogic the subtotals are incorrect if you remove the start of the week from the table it is not counting correctly and the % calculation is incorrect.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.