Forum Discussion
Show Distinct Count on a card based on multiple selections
I simplified the Flag type by representing them as numbers (1-12)
At any point the user will select multiple flags and the main table with the account info will filter as such.
The table contains the main bill-to account in 1 column and then the next column will show the various ship-to accounts associated with the main bill-to account. example below
| Bill To Acct | Ship To acct |
| 100 | 103 |
| 100 | 101 |
| 100 | 102 |
| 200 | 201 |
| 200 | 202 |
Distinct Count = 2
I just need a measure to show the distinct count of bill to account(s) in the column.
The measure i created shows any account associated with the selected flags, so it'll show large figures. I need it to show the accounts associated with at least these selected flags.
So if 3 flags are chosen we want it to show the accounts that have AT LEAST those 3 flags but are not limited to. If one of those accounts shown have a 4th flag, it should still show. Obviously we can narrow it down by selecting said 4th flag.
Hi Anonymous ,
So basically you want filter the table according to selected flags and distinct count the bill to account? But what's the relationship between the flags and the table you shown above? Do you have flag column in the table above?
Best Regards,
Jay
- Anonymous4 years agoNot applicable
Yes that is correct
I have a flag measure on the visual with the account information. I set it to "shows items when the value is _1_ "
the measure:
Invoices with all selected flags =Var FLAGTYPECT = DISTINCTCOUNT('TABLE'[FLAG])Var FLAGTYPEROWS = COUNTROWS(ALLSELECTED('TABLE'[FLAG]))Var Result = IF(FLAGTYPECT = FLAGTYPEROWS, 1, 0)RETURNResult