DAX and COUNTIFS Equivalent

cognostom

New Member
Joined
Aug 27, 2015
Messages
3
Hi,
This is my first post on this site although I use it most days to find solutions. I'm also fairly new to PowerPivot.
I am analysing data from our admissions system. Two of the columns I am looking at contain ticket_id and scan_description. The theory is that no single ticket can be successfully scanned more than once, meaning that each ticket_id should be unique in this column. However, because of a bug in the system this is currently not the case. In Excel i simply use COUNTIFS to tell me that if the scan was successful, does the ticket_id exist more than once in that column. Now that i have moved my data over to PowerPivot, i would like to perform the same function using DAX but cannot get it to work. I have been using a combination of CALCULATE, COUNT AND FILTER but have run out of ideas. Here's a sample of my data:
ticket_idtimestampscan_description
77781410:22:26Success
77781510:22:35Success
77781610:22:43Success
77781710:22:50Success
77781810:23:02Success
77897411:04:27Success
77897511:04:32Success
77969110:01:15Success
77969210:01:17Success

<tbody>
</tbody><colgroup><col><col><col></colgroup>

Many thanks!
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
You could create a calculated column that contains the count of same id tix.
=CALCULATE(COUNTROWS(Tickets), FILTER(Tickets, Tickets[Ticket_Id] = EARLIER(Tickets[Ticket_Id]))

Then use that column for various fancy things.
 
Upvote 0

Forum statistics

Threads
1,214,636
Messages
6,120,669
Members
448,977
Latest member
moonlight6

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top