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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply

IF is blank show me value from column

Hello.
I prepared a below measure that allow me to hide text. If there is no filter selection there no name on the card, but when i select something inside a filter i will see a name. 

SubDealerNM_HIDE =
IF (
    ISFILTERED ('Accountflex Data'[Dealer ID and Name Filter]) || ISFILTERED('Accountflex Data'[SubDealer_ID_NM]),
    SELECTEDVALUE('Sub Dealer Name'[SubDealerName]),
    " "
)


in most cases i have this type of name structure ( this is a example )

 



5640 - Google ( main )
5410 - Google ( submain )
4781 - Google ( submain )

and this give me this result : Google

but if I have something like this:

5640 - Google ( main )
5410 - Google ( submain )
5460 - Microsoft ( submain )
4781 - Google ( submain )

and this give me result : Blank

How to modify my measure so that in the case of " Blank " it shows me the value from a specific column.

Regards Piotr.
1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi  @piotrgrendus87 ,

I created some data:

vyangliumsft_0-1668476954735.png

Here are the steps you can follow:

1. Create measure.

No filter selection there no name on the card

Measure =
IF(
    HASONEVALUE('Sub Dealer Name'[Dealer ID and Name Filter])&&HASONEVALUE('Sub Dealer Name'[SubDealer_ID_NM])
    ,MAX('Sub Dealer Name'[SubDealerName]),BLANK())

 In the case of " Blank " it shows me the value from a specific column

Measure2 =
IF(
    HASONEVALUE('Sub Dealer Name'[Dealer ID and Name Filter])&&HASONEVALUE('Sub Dealer Name'[SubDealer_ID_NM])
    ,MAX('Sub Dealer Name'[SubDealerName]),
    MAXX(FILTER(ALL('Sub Dealer Name'),'Sub Dealer Name'[Dealer ID and Name Filter]=5460&&'Sub Dealer Name'[SubDealer_ID_NM]="5460 - Microsoft"),[SubDealerName]))

2. Result:

vyangliumsft_1-1668476954740.png

 

Best Regards,

Liu Yang

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

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Hi  @piotrgrendus87 ,

I created some data:

vyangliumsft_0-1668476954735.png

Here are the steps you can follow:

1. Create measure.

No filter selection there no name on the card

Measure =
IF(
    HASONEVALUE('Sub Dealer Name'[Dealer ID and Name Filter])&&HASONEVALUE('Sub Dealer Name'[SubDealer_ID_NM])
    ,MAX('Sub Dealer Name'[SubDealerName]),BLANK())

 In the case of " Blank " it shows me the value from a specific column

Measure2 =
IF(
    HASONEVALUE('Sub Dealer Name'[Dealer ID and Name Filter])&&HASONEVALUE('Sub Dealer Name'[SubDealer_ID_NM])
    ,MAX('Sub Dealer Name'[SubDealerName]),
    MAXX(FILTER(ALL('Sub Dealer Name'),'Sub Dealer Name'[Dealer ID and Name Filter]=5460&&'Sub Dealer Name'[SubDealer_ID_NM]="5460 - Microsoft"),[SubDealerName]))

2. Result:

vyangliumsft_1-1668476954740.png

 

Best Regards,

Liu Yang

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

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.