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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
summer18
Helper III
Helper III

help with wildcard character

I know this is easy for you guys but my formula could not seem to work. If you can please help me on the formula in red font

 

RESULT =
SWITCH(TRUE(),
'Table'[Type]="Series",'Table'[Grade_ Assignment],
'Table'[Type]="Movie" && ISBLANK('Table'[Adviser]) && 'Table'[Title]="Beauty & the Beast",'Table'[Grade_ Assignment],
'Table'[Adviser]
)

 

Here is my desired result:

 

img004.jpg

 

Hoping for any assistance.  Thank you in advance

1 ACCEPTED SOLUTION
selimovd
Super User
Super User

Hey @summer18 ,

 

I think the logic was missing a few parts, but that here should work:

RESULT = 
SWITCH(
    TRUE(),
    'Table'[Type] = "Series",'Table'[Grade_ Assignment],
    'Table'[Type] = "Movie" && (ISBLANK('Table'[Adviser]) || 'Table'[Adviser] = "") && 'Table'[Title]="Beauty & the Beast",'Table'[Grade_ Assignment],
    'Table'[Type] = "Songs" && (ISBLANK('Table'[Adviser]) || 'Table'[Adviser] = "") , 'Table'[Grade_ Assignment],
    'Table'[Type] = "Songs", 'Table'[Adviser],
    'Table'[Adviser]
)

 

For the next time, please paste a table and not a screenshot of the table. I had to type the whole table by hand now to check the formula...

 

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 @summer18 ,

 

I think the logic was missing a few parts, but that here should work:

RESULT = 
SWITCH(
    TRUE(),
    'Table'[Type] = "Series",'Table'[Grade_ Assignment],
    'Table'[Type] = "Movie" && (ISBLANK('Table'[Adviser]) || 'Table'[Adviser] = "") && 'Table'[Title]="Beauty & the Beast",'Table'[Grade_ Assignment],
    'Table'[Type] = "Songs" && (ISBLANK('Table'[Adviser]) || 'Table'[Adviser] = "") , 'Table'[Grade_ Assignment],
    'Table'[Type] = "Songs", 'Table'[Adviser],
    'Table'[Adviser]
)

 

For the next time, please paste a table and not a screenshot of the table. I had to type the whole table by hand now to check the formula...

 

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
 

Hi @selimovd , thank you very much! It works!  Sorry for pasting the screenshot of the table.  I could not see where I can attach my pbix.

Hey @summer18 ,

 

no problem, I'm happy it works 😊

Yes, that's a little bit the problem in this forum, you cannot attach a PBIX file. But you could upload it to OneDrive, Dropbox, SwissTransfer or something similar and post the link.

 

But you can always post the table as a html table, then I can just paste the values to my PBIX file:

selimovd_0-1624606739592.png

 

Best regards

Denis

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors