
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Using Asterisk literal in set analysis count function?
I'm trying to get a COUNT of [Services.Service Name] where the [Service Name] starts with an asterisk.
This works for the letter "A":
Count({<[Services.Service Name] = {"A*"}>}[Services.Service Name])
But I can't figure out how to use an asterisk as a string literal in a set aggregate function. I tried multiple things. Any ideas?
Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
What if you try
Count({<[Services.Service Name] = {"=left([Services.Service Name] ,1)='*'"}>}[Services.Service Name])

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
What if you try
Count({<[Services.Service Name] = {"=left([Services.Service Name] ,1)='*'"}>}[Services.Service Name])

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@mbeccaria not sure how exactly do you want to search asterisk but you could try below if you just want to search asterisk
Count({<[Services.Service Name] = {"?*?"}>}[Services.Service Name])

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
That did it! I didn't think to use the left operator. I was working on using replace to replace the * with an alternate character that would work in a query. This is much more elegant. Thanks!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yea i think that's the other option. But i agree, if you know it's your first character, this is much easier to read. i would do replace if it could be anywhere in your string.
