This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreLevel up your Power BI skills this month - build one visual each week and tell better stories with data! Get started
Hi
Im trying to create a measure to count the total unique records where template starts with AB-
| unique | template | date |
| abc | AB-123 | Jan-19 |
| abcd | AB-124 | Feb-19 |
| abcde | FG-12 | Jan-19 |
| abcde | DG-12 | Jan-19 |
| abc1 | AB-123 | Feb-19 |
| abcd2 | FG-12 | Jan-19 |
| abcd3 | AB-124 | Jan-19 |
| abcde4 | HG1 | Feb-19 |
| af12 | AB-125 | Jan-19 |
Measure 1 =
CALCULATE(
COUNT('Records'[Column.unique])
,FILTER(
('Records'),
LEFT('Records'[Column.template],3) = "AB-"
)
)
I have tried this but instead of returning 5 (as in 5 unique records that start with AB-) it returns 3 (as there are 3 different records in templates that start with AB)
any ideas please ?
many thanks
jason
Solved! Go to Solution.
hi thats is quite strange, ive added your data to a model and run your calculation and i get 5, can you share your pbix?
Proud to be a Super User!
@slipstream Your Measure logic is returning 5 as well, not sure why it is 3 at your end ?
Please try this as a New Measure...
Test238 = COUNTROWS(FILTER(Test238Measure,LEFT(Test238Measure[Template],3)="AB-"))
Proud to be a PBI Community Champion
apologies all, seems it was working, just my ability to type wasnt ! 🙂
thank you all for your help
cheers
hi thats is quite strange, ive added your data to a model and run your calculation and i get 5, can you share your pbix?
Proud to be a Super User!
Check out the April 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 37 | |
| 28 | |
| 28 | |
| 19 | |
| 17 |
| User | Count |
|---|---|
| 68 | |
| 38 | |
| 32 | |
| 28 | |
| 24 |