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
dudu55
Frequent Visitor

new mesure if column X starts with XXX and column B is empty then new mesure is queal to columns X

Im trying to write new mesure but trully have no idea how to do it , it should be like that :

 

new mesure = if column X starts with XXX and column B is empty then new mesure is queal to columns X if columnY is queal to YYY  new mesure is equal to YYY

 

how can i write this in new mesure? help!

1 ACCEPTED SOLUTION
selimovd
Super User
Super User

Hey @dudu55 ,

 

I guess you want that as a calculated column.

If it's as a column that should work:

new mesure column =
SWITCH(
    TRUE(),
    LEFT( myTable[column X], 3 ) = 'XXX' && myTable[column B] = BLANK(), myTable[columns X],
    myTable[column Y] = 'YYY', 'YYY'
)

 

If you need any help please let me know.
If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍
 
Best regards
Denis
 

 

View solution in original post

3 REPLIES 3
selimovd
Super User
Super User

Hey @dudu55 ,

 

I guess you want that as a calculated column.

If it's as a column that should work:

new mesure column =
SWITCH(
    TRUE(),
    LEFT( myTable[column X], 3 ) = 'XXX' && myTable[column B] = BLANK(), myTable[columns X],
    myTable[column Y] = 'YYY', 'YYY'
)

 

If you need any help please let me know.
If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍
 
Best regards
Denis
 

 

Hey @dudu55 ,

 

did my calculated column give you the result you wanted?

I'm curious if you could solve this issue 🙂

 

If you need any help please let me know.
If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍
 
Best regards
Denis
 
ryan_mayu
Super User
Super User

@dudu55 

maybe you need to create a column not a measure?

could you pls provide some sample data and expected output?





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




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!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

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.