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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
CliffordAP
Helper II
Helper II

DAX Studio - DMV Queries - Where LIKE Condition Expression

Hello all!

I am exploring this ability in Dax Studio to query measures by their names and expressions via the 'DMV' tab:

CliffordAP_0-1668545098698.png

I have a question about how to query the measures with these objects.
I can run a query with a where clause that is equal to or not equal to something like this:

CliffordAP_1-1668545248553.png

But what I would like is a query that can evaluate a string CONTAINED in the expression (In SQL they use a 'LIKE' expression).
I looked at a lot of examples, but the documentation about the features for these queries are very limited and none refer to this kind of query.
I'm going for something like:

CliffordAP_2-1668545412663.png

Any help would be greatly appreciated.

1 REPLY 1
v-yueyunzh-msft
Community Support
Community Support

Hi , @CliffordAP 

Im's sorry i'm not very knowledgable abnout the DMV.As searched, I think you can try add % in your sql .

LIKE 'w%'

For more information, you can refer to :
SQL LIKE Operator (w3schools.com)

 

And you can try to use dax use  the CONTAINSSTRING() function:

EVALUATE
FILTER('$SYSTEM.TMSCHEMA_MEASURES',CONTAINSSTRING('$SYSTEM.TMSCHEMA_MEASURES'[Expression],"w"))

 

For more information, you can refer to :

CONTAINSSTRING function (DAX) - DAX | Microsoft Learn

 

Best Regards,

Aniya Zhang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

 

 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.