Join 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!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
I am trying to create a measure in Power BI where I am counting the distinct rows of one column if another column contains certain text in a string and keep getting an error. Any assistance would be helpful.
Solved! Go to Solution.
@Anonymous ,
try this measure,
Count of Task Name =
CALCULATE(
DISTINCTCOUNT('Table'[Task Name]),
CONTAINSSTRING('Table'[Label],"Weekly"))
Thanks,
Arul
Hello,
Here is some sample data below. The data is based on tasks activity and I want to count the unique Task Names when Labels column contains "Weekly". I'm trying to determine the unique tasks names and what their freqnecies are.
| Task Name | Label |
| Arkansas Children's Hospital - HCP Surveys | Quarterly;HCP Surveys |
| Crouse Health - Future Visibility | Weekly;Future Visibility |
| Internal Delivery - Influenza Vaccination Status | Weekly;Credential Data |
| Crouse Health - Future Visibility | Weekly;Future Visibility |
@Anonymous ,
try this measure,
Count of Task Name =
CALCULATE(
DISTINCTCOUNT('Table'[Task Name]),
CONTAINSSTRING('Table'[Label],"Weekly"))
Thanks,
Arul
Thank you, this was helpful.
@Anonymous ,
Please provide some sample data and the expected output with high level explanation of your requirement.
Thanks,
Arul
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 38 | |
| 37 | |
| 33 | |
| 32 | |
| 29 |
| User | Count |
|---|---|
| 132 | |
| 88 | |
| 82 | |
| 68 | |
| 64 |