Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
I have a data set that looks like so
Merchant ID column contains repeated values for a specific merchant
Transaction ID contains unique values for each transaction
Credit Debit Column Flags whether the transaction is a Credit or a Debit
I'm wondering if there is DAX i could use to calculate the Counts pictured above.
Count of Merchant doing ONLY Debit transactions
Count of Merchant doing ONLY Credit transactions
Count of Merchant doing BOTH Debit & Credit transactions
Count of All Merchants
This is what I have so far, its a hard value to verify manually querying the database, and I have a feeling the formulas are incorrect!
Counts Total Merchants: TotalMerchants = DISTINCTCOUNT(DST_TGO[MID]) Counts Total Debit Merchants: TotalDebitMerchants = CALCULATE(DISTINCTCOUNT(DST_TGO[MID]),CreditDebitCode[IsDebit] = 1) Counts Total Credit Merchants TotalCreditMerchants = CALCULATE(DISTINCTCOUNT(DST_TGO[MID]),CreditDebitCode[IsDebit] = 0)
Thanks in advance!
Solved! Go to Solution.
Hi@ jeffgarlisch
You need to improve your measure and do them more deeply
Count Combo = [TotalCreditMerchants]+[TotalDebitMerchants]-[TotalMerchants] Count Credit = [TotalMerchants]- [TotalDebitMerchants] Count Debit = [TotalMerchants]- [TotalCreditMerchants]
Result:
Best Regards,
Lin
Hi@ jeffgarlisch
You need to improve your measure and do them more deeply
Count Combo = [TotalCreditMerchants]+[TotalDebitMerchants]-[TotalMerchants] Count Credit = [TotalMerchants]- [TotalDebitMerchants] Count Debit = [TotalMerchants]- [TotalCreditMerchants]
Result:
Best Regards,
Lin
Thanks so much! I dont know why I didnt thinkof that, I must've been too close to the problem!
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
111 | |
100 | |
80 | |
64 | |
58 |
User | Count |
---|---|
146 | |
110 | |
93 | |
84 | |
67 |