cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
heytherejem Post Patron
Post Patron

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. 

 

Sample.pngData

1 ACCEPTED SOLUTION

Accepted Solutions
Super User III
Super User III

Re: Summarise data in two columns

Hi @heytherejem

 

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
Super User III
Super User III

Re: Summarise data in two columns

Hi @heytherejem

 

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

Highlighted
heytherejem Post Patron
Post Patron

Re: Summarise data in two columns

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

 Pie.PNG

Super User III
Super User III

Re: Summarise data in two columns

@heytherejem

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

Helpful resources

Announcements
Announcing the New Spanish Forum

Announcing the New Spanish Forum

Do you need help in Spanish? Check out our new Spanish community section.

April 2020 Community Highlights

April 2020 Community Highlights

Info on our Super Users, MBAS content and badges, and updates to our support articles. - Read the full Community Highlights.

MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.

Top Solution Authors
Top Kudoed Authors