Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now
I have two tables, one with orders, and one with the items on the order. They are linked by a separate key:
In the example I have:
I am looking for a measure that will give me that last output. i.e. a distinct count of the order, where the distinct count of the item = 1
I tried below but it is gving me a zero output
CALCULATE( DISTINCTCOUNTNOBLANK(Table1[Order]) ,
FILTER( RELATEDTABLE(Table2), DISTINCTCOUNTNOBLANK(Table2[Item])=1) )
Solved! Go to Solution.
@dapperscavenger , Assume two table are related with each other, try a measure like
CALCULATE( Countx(filter(Summarize( Table2, Table1[Order] , "_1" , DISTINCTCOUNTNOBLANK(Table2[Item])),[_1] =1 ),[Order]))
or
CALCULATE( Countx(filter(Summarize( Table1, Table1[Order] , "_1" , DISTINCTCOUNTNOBLANK(Table2[Item])),[_1] =1 ),[Order]))
@dapperscavenger , Assume two table are related with each other, try a measure like
CALCULATE( Countx(filter(Summarize( Table2, Table1[Order] , "_1" , DISTINCTCOUNTNOBLANK(Table2[Item])),[_1] =1 ),[Order]))
or
CALCULATE( Countx(filter(Summarize( Table1, Table1[Order] , "_1" , DISTINCTCOUNTNOBLANK(Table2[Item])),[_1] =1 ),[Order]))
Worked great! Thank you!
Check out the October 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
109 | |
108 | |
108 | |
91 | |
61 |
User | Count |
---|---|
171 | |
139 | |
133 | |
102 | |
86 |