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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors