CONTAINSROW() DAX Function Tutorial (is DAX CONTAINSROW() = WHEN EXISTS() in SQL?), Plus a Fraud Detection Calculation

Can we do a CONTAINSROW() DAX function tutorial while implementing a coupon redemption fraud detection calculation? Yes! Can we add to this a discussion about how to calculate distinct counts on temp tables? You betcha! In fact, we can do it all in one video. The dataset is simple, we will take a look at coupons and their redemption dates by retailer. If we see the same coupon redeemed more than once, then that’s fraud and our sales and marketing teams would definitely want to know the impact of that on our revenue.

You can download the file used in this tutorial here.

2 thoughts on “CONTAINSROW() DAX Function Tutorial (is DAX CONTAINSROW() = WHEN EXISTS() in SQL?), Plus a Fraud Detection Calculation

  1. I have data model for a bank, the model has customer information and the products the customer has. what we consider a preferred customer is a customer who has a “Basic Saving Account”, so when need the count for “referred customer”, we a measure:
    Preferred Customer = CALCULATE (
    DISTINCTCOUNT(‘Customers'[Customer ID]),
    ‘Customers'[Account Type]=”Basic Saving Account’
    )
    now, we need to count the “preferred customer”s who have “Checking Accounts” and “CD’s” etc.
    how can I do it?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s