Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin 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.
Good day all,
I have a dataset that looks like below. I was trying to get a distinct count of 'sentence_id' column when 'level_3' is both 'actions' and 'contacts'.
| sentence_id | level_3 |
| 1280590690 | Actions |
| 1280590690 | Contact |
| 1280590690 | Actions |
| 1280590690 | Actions |
| 1280590690 | Actions |
| 1280590690 | Contact |
| 1280590690 | Contact |
Solved! Go to Solution.
Hi @Moe_M ,
According to your description, here are my steps you can follow as a solution.
(1) This is my test data.
(2) We can create a measures.
Measure = CONCATENATEX(FILTER(ALLSELECTED('Table'),[sentence_id] in VALUES('Table'[sentence_id])),[level_3],",")Measure 2 = var a={"Actions","Contact"}
var b=COUNTROWS(FILTER(a,CONTAINSSTRING([Measure],[Value])))
return IF(b=COUNTROWS(a),1,0)Measure 3 = CALCULATE(DISTINCTCOUNT('Table'[sentence_id]),FILTER('Table',[Measure 2]=1))
(3) Then the result is as follows.
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Moe_M ,
According to your description, here are my steps you can follow as a solution.
(1) This is my test data.
(2) We can create a measures.
Measure = CONCATENATEX(FILTER(ALLSELECTED('Table'),[sentence_id] in VALUES('Table'[sentence_id])),[level_3],",")Measure 2 = var a={"Actions","Contact"}
var b=COUNTROWS(FILTER(a,CONTAINSSTRING([Measure],[Value])))
return IF(b=COUNTROWS(a),1,0)Measure 3 = CALCULATE(DISTINCTCOUNT('Table'[sentence_id]),FILTER('Table',[Measure 2]=1))
(3) Then the result is as follows.
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 78 | |
| 48 | |
| 34 | |
| 31 | |
| 29 |