Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago

DISTINCT COUNT WITH FILTER

Hi, I am trying to create a measure that is going ot divide the total number of ditint rows by the total number of distint rows that are in the category "A" to see the % of rows that are category "A".

I have tried different formulas 

 

DD_Collector_%_OpenTransactions =
VAR COLL_TRANSACTIONS = CALCULATE(FILTER(Table1,Table1[a_A/B] = "A"), DISTINCTCOUNT(Table1[Transactions]))
VAR COLL_TRANSACTIONS_A = CALCULATE(DISTINCTCOUNT(Table1[Transactions]), FILTER(ALL(Table1[a_A/B], Table1[Status]),Table1[a_A/B] = "A" && Tabe1[Status] = "Open"))
VAR COLL_TRANSACTIONS_A2 = CALCULATE(DISTINCTCOUNT(Table1[Transactions]), Table1[a_A/B] = "A" && Table1[Status] = "Open")

RETURN
COLL_TRANSACTIONS_A COLL_TRANSACTIONS
 
COLL_TRANSACTIONS_A and COLL_TRANSACTIONS_A2 are the same I just did a try bith both but they don't work

1 Reply