Quantcast
Channel: Desktop topics
Viewing all articles
Browse latest Browse all 216047

How to return customers with no transactions

$
0
0

Hello Everyone. Please see my problem below and help me if you can.

I have created two tables in Power BI. One is transactions with Customer ID, Sales Amount, Date. The other is the list of Customers. CustomerID is the Join Key between these two tables.

 

I have create two measures i) Count of Transactions = COUNT(CustomerID) and ii) SalesAmount = SUM(Sales Amount)

 

Now I try to create a simple report using Table Visual. It shows me only the matching customer ID's and their counts.

 

I want to see users with 0 Transactions (basically like a left join) as well. I achieved it by using a IF(ISBLANK([count of transactions]), 0, [count of transactions]). This works perfectly.

Now I try to create a Dynamic Segmentation by counts of transactions. 0, 1-5, 6-10, >10 are the ranges. I have followed the steps on SQL BI  and it works fine if I don't use the ISBLANK one. If I use that measure, I am getting all records as 0 if they are not in the segment I am looking for. 

 

"https://www.powerpivotpro.com/2014/11/new-twist-for-dynamic-segmentation-variable-grain-range-selection/" this is link I followed to do this.

 

If there is any other way to show customers count as 0 who didn't make any purchases or not present in the order table, please let me know.


Viewing all articles
Browse latest Browse all 216047

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>