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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
subhadip
Helper II
Helper II

Hide Blank in Card for Power BI Desktop

We have  1 to Many Relationship between 2 Entity Employee and Bank .

There are some Employee for which Bank details are not avaiable .  We are displaying Amount in card visual  and it is comming as "BLANK"

.

We thought of writing DAX and put some Custom Message in place of "BLANK" as "NOT Available"

IF(ISBLANK(Measure),"NA",Measure)

The Above DAX works when we have Data for Bank Entity w.r.t Employee Entity. If we don't have data for child entitiy how do we handle the "BLANK" in card visual . Please suggest

 

5 REPLIES 5
Anonymous
Not applicable

Hi, 

You can hide the blank value using a Conditional Formatting rule on the Callout Value. The rule is 'if blank' then select the same color as the card or canvas background. 

I have created a video tutorial on how to create the conditional rule: https://youtu.be/Xsmbfpa4oCA

biancagilly_1-1652137235851.png

 

 

v-yulgu-msft
Employee
Employee

Hi @subhadip,

 

I tested with your provided measure, it works as expected. In my test, there is no corresponding records for Employee D in bank table.

1.PNG2.PNG

 

For more advice, please provide some sample data so that I can try to reproduce.

 

Regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

It is 2 different Tables Employee (Distinct EmpId)  Bank, with One To Many Relationship in Power BI Model .

When EmployeeId is getting selected in SLICER visual for those Employee who don't have Bank Entries , Card Visual showing as "BLANK"

 

Tried creating the DAX on Bank Entity in Power Bi 

IF(ISBLANK(Amount),"NA",Amount) it is not working since the DAX is working on the dataset who have entries .

 

EmpId  EmpName

1          A

2          B

 

BankId EmpId Amount

100      1         100

 

So for the EmpId 2 we don't have any entry in Bank , so If we create a  measure using DAX, will it helps.

 

Please suggest.

 

 

 

Can someone Please revert with their valid input.

Anonymous
Not applicable

Hello @subhadip,

 

Its easy, you just need to show to your measure how to behave if a child entitiy is filtered with the Dax functions: ISFILTERED or/and HASONEFILTER.

 

Like: 

 

IF([Measure]=0;BLANK();IF(ISFILTERED(Table[Parent Column]);if(HASONEFILTER(table[Child Column]);[...])

 

In the [...] you put the results measures you want to do.

 

Cheers, 

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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