Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance 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 |
---|---|
25 | |
12 | |
8 | |
6 | |
6 |
User | Count |
---|---|
26 | |
12 | |
11 | |
8 | |
6 |