Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Probably quite basic and trivial., but i am basically trying to do a count of distinct account numbers, where the total revenue is <£10000
CstmrGrp = CALCULATE(DISTINCTCOUNT('Customer Group Accounts'[Group Name]), H12015[FinalAmountCalc]<10000)
FinalAmountCalc = Calculate(Sum(H12015[Final Amount (£)]))
maybe im just approaching this incorrectly but any help would be appreciated!
Solved! Go to Solution.
Hi @Anonymous
It seems [Group Name] in table 'Customer Group Accounts' has duplicates, and 'Customer Group Accounts' has a realtionship with table 'H12015'.
Based on my test, i create a related calculated column in the table 'Customer Group Accounts' from table 'H12015'.
related = RELATED(H12015[Final Amount (£)])
flag = IF(MAX([related])<10000&&MAX([related])>0,1,0)
discount = CALCULATE(DISTINCTCOUNT('Customer Group Accounts'[Group Name]),FILTER(ALL('Customer Group Accounts'),[flag]=1))
Best regards
Maggie
Hi @Anonymous
It seems [Group Name] in table 'Customer Group Accounts' has duplicates, and 'Customer Group Accounts' has a realtionship with table 'H12015'.
Based on my test, i create a related calculated column in the table 'Customer Group Accounts' from table 'H12015'.
related = RELATED(H12015[Final Amount (£)])
flag = IF(MAX([related])<10000&&MAX([related])>0,1,0)
discount = CALCULATE(DISTINCTCOUNT('Customer Group Accounts'[Group Name]),FILTER(ALL('Customer Group Accounts'),[flag]=1))
Best regards
Maggie
Group Name is a distinct table it is used as a unique key for H12015 which is the file with all the transactions and i am able to convert the account names in the H12015 file to distinct group names using the group name table.
thanks for helping Maggie!
Hi @Anonymous
Since Group Name is a unique key, my previous formula also so help, or just replace "DISCOUNT" with "COUNT", does my reply slove your problem, if so, could you accept it as a solution so that others may refer to it.
Best Regards
Maggie
my hero