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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
Anonymous
Not applicable

Summarise data in two columns

I have two columns in my raw dataset which contain the values "On Time" or "Not on Time" and only one of the two columns is populated at any given time. See below example.

 

I want a measure that counts the "On Time" and "Not on Time" from both columns. 

 

DataData

1 ACCEPTED SOLUTION
AlB
Community Champion
Community Champion

Hi @Anonymous

 

Try these two measures in for instance Card visuals:

 

 

NumberOfOnTime =
CALCULATE ( COUNT ( Table1[14 Day SLA] ), Table1[14 Day SLA] = "On Time" )
    + CALCULATE ( COUNT ( Table1[21 Day SLA] ), Table1[21 Day SLA] = "On Time" )

 

NumberOfNotOnTime =
CALCULATE ( COUNT ( Table1[14 Day SLA] ), Table1[14 Day SLA] = "Not On Time" )
    + CALCULATE ( COUNT ( Table1[21 Day SLA] ), Table1[21 Day SLA] = "Not On Time" )

 

Code formatted with   www.daxformatter.com

 

View solution in original post

3 REPLIES 3
AlB
Community Champion
Community Champion

Hi @Anonymous

 

Try these two measures in for instance Card visuals:

 

 

NumberOfOnTime =
CALCULATE ( COUNT ( Table1[14 Day SLA] ), Table1[14 Day SLA] = "On Time" )
    + CALCULATE ( COUNT ( Table1[21 Day SLA] ), Table1[21 Day SLA] = "On Time" )

 

NumberOfNotOnTime =
CALCULATE ( COUNT ( Table1[14 Day SLA] ), Table1[14 Day SLA] = "Not On Time" )
    + CALCULATE ( COUNT ( Table1[21 Day SLA] ), Table1[21 Day SLA] = "Not On Time" )

 

Code formatted with   www.daxformatter.com

 

Anonymous
Not applicable

Yep, totally worked. Thanks! See below my fancy new visual.

 Pie.PNG

AlB
Community Champion
Community Champion

@Anonymous

I hadn't seen anything fancier in quite a while I must admit Smiley Happy

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors