Forum Discussion
Hezekiah
8 years agoFrequent Visitor
Changing context
I have two tables, Person and Product Usage. The Person table has a Person ID field. Product Usage Table has two fields: Person ID and Product. Each record in the Product Usage table indicates which ...
- Anonymous7 years ago
Hi Hezekiah,
When I test on your data, I found a simply way to achieve your requirement, please try to use below measure formulas:
Count of All Purchased = COUNTROWS ( FILTER ( SUMMARIZE ( ALLSELECTED ( 'Product Usage' ), [ID], "Count", COUNT ( 'Product Usage'[Product] ) ), [Count] = COUNTROWS ( ALLSELECTED ( 'Product Usage'[Product] ) ) ) ) All Purchased Customer list = CONCATENATEX ( FILTER ( SUMMARIZE ( ALLSELECTED ( 'Product Usage' ), [ID], "Count", COUNT ( 'Product Usage'[Product] ) ), [Count] = COUNTROWS ( ALLSELECTED ( 'Product Usage'[Product] ) ) ), [ID], "," )Regards,
Xiaoxin Sheng
Anonymous
7 years agoNot applicable
Hi Hezekiah,
If you can please share a pbix file with some sample file to test and code formula.
Regards,
Xiaoxin Sheng
Hezekiah
7 years agoFrequent Visitor
Yes, of course. I appreciate ypour help very much.
I don't see a file sharing function built into the forum, so here is a link to a Dropbox file:
- Anonymous7 years agoNot applicable
Hi Hezekiah,
When I test on your data, I found a simply way to achieve your requirement, please try to use below measure formulas:
Count of All Purchased = COUNTROWS ( FILTER ( SUMMARIZE ( ALLSELECTED ( 'Product Usage' ), [ID], "Count", COUNT ( 'Product Usage'[Product] ) ), [Count] = COUNTROWS ( ALLSELECTED ( 'Product Usage'[Product] ) ) ) ) All Purchased Customer list = CONCATENATEX ( FILTER ( SUMMARIZE ( ALLSELECTED ( 'Product Usage' ), [ID], "Count", COUNT ( 'Product Usage'[Product] ) ), [Count] = COUNTROWS ( ALLSELECTED ( 'Product Usage'[Product] ) ) ), [ID], "," )Regards,
Xiaoxin Sheng
- Hezekiah7 years agoFrequent Visitor
Wow, that's outstanding. Thank you so much for your help!