Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The FabCon + SQLCon recap series starts April 14th at 8am Pacific. If you’re tracking where AI is going inside Fabric, this first session is a can't miss. Register now

Reply
Anonymous
Not applicable

Using DAX Wild Cards

Hi 

 

I've been experimenting with DAX wild cards but not getting the results I expected. 

 

Here's a sample of the data I'm using:

 

DAta Extract.PNG

 

CALCULATEI wondered whether I could, in CALCULATE statements, use just part of the "Product" text by using wildcards. I've created the  following Measures:

C1 Sales = CALCULATE([Total Sales £],Sales[Product]="C*") (**I expected this to select rows with"Carrot")
Pot Sales = CALCULATE([Total Sales £],FILTER(Sales,Sales[Product]="Pot*")) (**I expected this to select rows with"Potato")
ThirdLetterO Sales = CALCULATE([Total Sales £],Sales[Product]="??o*") (**I expected this to select rows with"Whole Wheat")

 

, but I can't get these to work, for example:

 

WC Blues.PNG

These 2 work fine - no wildcards:

 

Carrot Sales = CALCULATE([Total Sales £],Sales[Product]="Carrot")
Potato Sales = CALCULATE([Total Sales £],Left(Sales[Product],3)="Pot")
 
So - what's wrong with my attempts at using wildcards in CALCULATE, with or without FILTER?
 
Thanks!

 

 

 

 

2 REPLIES 2
Anonymous
Not applicable

Sorry, forgot to include link. It's at:

 

https://1drv.ms/u/s!AmxJyApgEAcYgu8hWCiVMg5ovezi2A?e=jFKcxr 

Hi, here are some possible strategies for solving your problem:
https://www.sqlbi.com/articles/from-sql-to-dax-string-comparison/

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.