Forum Discussion
bourne2000
Helper V
4 years agoFilter visual by measure not working
Hi I have a big data which is 3.3 million and coming from AWS Redshift. I connected through direct query In my table I have a column called Merchant ID. I need to calculate distinct count the...
PaulDBrown
Community Champion
4 years agoTry using this measure for the value of the card
Distinctcount >1 =
VAR TotMerchants =
DISTINCTCOUNT ( instore_transactions_la_month[merchant_id] )
RETURN
COUNTROWS ( FILTER ( instore_transactions_la_month, TotMerchants > 1 ) )
bourne2000
Helper V
4 years agoPaulDBrown Measure is working. But it gives the entire dataset records which is 3.3 million. It's not filtering. Thanks for your reply. Kindly advise
- PaulDBrown4 years ago
Community Champion
Try:
Merchant Ids > 1 = SUMX ( ADDCOLUMNS ( VALUES ( 'instore_transactions_la_month'[merchant_id] ), "Ids", IF ( CALCULATE ( COUNT ( 'instore_transactions_la_month'[merchant_id] ), ALLEXCEPT ( 'instore_transactions_la_month', 'instore_transactions_la_month'[merchant_id] ) ) > 1, 1 ) ), [Ids] )- bourne20004 years ago
Helper V
PaulDBrown Measure is working, however, it shows value 93. Actual value is 269.
- PaulDBrown4 years ago
Community Champion
Please share some (fake) data to work out the correct measure