The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
CALCULATE ( COUNTROWS('Qoutes'), RELATEDTABLE('Sales'), 'Sales'[GP] > 0, 'Sales'[customerid] IN VALUES('Qoutes'[customerid]), VALUES('Qoutes'[Month]), VALUES('Qoutes'[Day]) )
There are 15 customerids in the Sales Table in the given date range, but there are 10 customerids with Gp > 0. I want to count the values of these 10 customerids in my Qoutes table.
Solved! Go to Solution.
@atahancelik Sample data would help make this clearer. Put Month and Day into a visual as an adhoc hierarchy. Then maybe a measure like this:
Measure =
VAR __Customers = DISTINCT(SELECTCOLUMNS(FILTER('Sales', [GP] > 0), "__CustID", [customerid]))
VAR __Result = COUNTROWS(FILTER('Quotes', [customerid] IN __Customers))
RETURN
__Result
@atahancelik Sample data would help make this clearer. Put Month and Day into a visual as an adhoc hierarchy. Then maybe a measure like this:
Measure =
VAR __Customers = DISTINCT(SELECTCOLUMNS(FILTER('Sales', [GP] > 0), "__CustID", [customerid]))
VAR __Result = COUNTROWS(FILTER('Quotes', [customerid] IN __Customers))
RETURN
__Result
thank you
User | Count |
---|---|
27 | |
12 | |
8 | |
8 | |
5 |
User | Count |
---|---|
31 | |
15 | |
12 | |
7 | |
7 |