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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

DAX Measure Help !!- Create measure to count the number of logical expressions are true.

I'm trying to count the number of logical expressions that are true. The fields in the expressions are not all in one table. I've been creating custom columns using 'transform data', then using an if query to count number of logical expressions. This works because all my fields are in the same table/dataflow. Creating a custome column and using power query doesn't work if the fields I need are in different tables.

8 REPLIES 8
Anonymous
Not applicable

Logic expression needed - If job number -> 'job details' has a blank complete date -> 'job details' and job type  'job details' = 'OB' and CAT 35 - 'Business Unit Ma' is blank - then count number of true.

Anonymous
Not applicable

Job #Complete DateJob Type Cat 33      
123451/1/2021OB3246374      
67891 OB1287361      
43762 OB3274433      

 

Business Unit Ma table 

Anonymous
Not applicable

Anonymous
Not applicable

Job #Complete DateJob Type        
123451/1/2021OB       
67891 OB       
43762 OB       

 

Job Details table 

Anonymous
Not applicable

amitchandak
Super User
Super User

@Anonymous , In dax we can count true rows in a measure like

 

countrows(filter(Table, Table[Column]))

 

Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

DataflowsDataflows

 

A few of the logic expressions I need to create will be using fields from both dataflows, 'Job Details' and 'Business Unit Ma'. The logic expressions need to count the number of rows/job numbers meet the criteria. The count of the criteria is shown in the Dashboard Output. The criteria already in the output below is just using one dataflow table, 'Job Details' using custom columns and power query for those, not DAX. Since I have two dataflows now I need to use DAX but unsure what logic to use. 

Anonymous
Not applicable

Dashboard OutputDashboard Output

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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