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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Anonymous
Not applicable

How do i remove "BLANKS" in data cards ?

How do i remove "BLANKS" in data cards? 

1) FYI, i put the difference ratio of productivity between 2022 and 2021 (pic attached: the one written blank for 2021) and also together with the increased/decreased icon. The data card show the value when i choose slicer 2022 and blank for 2021. How do I remove the blanks ? 

I watched one tutorial on youtube, they just change the color background of the data cards same with the background of the cards to hide it. 

2) What if I had 10 years of data (2011-2022), how do i find the difference ratio. Below was the DAX that i used to find the difference ratio between 2 years.productivity (mt/ha)productivity (mt/ha)

 

Pengeluaran diff ratio = var _currentyear = MAX(Buah[Tahun])
VAR _pengeluaran_CurrentYear = CALCULATE([Pengeluaran],Buah[Tahun] = _currentyear)
var _pengeluaranPrevYear = CALCULATE([Pengeluaran],Buah[Tahun] = _currentyear-1)
return DIVIDE(_pengeluaran_CurrentYear-_pengeluaranPrevYear,_pengeluaranPrevYear

5 REPLIES 5
parry2k
Super User
Super User

@Anonymous If you use a new card visual, you can set a blank value in the format section without dealing with any work arounds. Read more here New card visual | Public preview | Microsoft Power BI Blog | Microsoft Power BI

 

👉 Learn Power BI and Fabric - subscribe to our YT channel - @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤️



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Anonymous
Not applicable

ohh thank you. That's a new thing that I just learned. Unfortunately, i need to do the card one my one. Kudos to you. Maybe next time i can use the multiple card like the one in New Card Visual.  

Ahmedx
Super User
Super User

you need following functions

= COALESCE([measure],"Not Supplied")

 

or
= SELECTEDVALUE([measure],"Not Supplied")

 

or

[measure] +0

Anonymous
Not applicable

I tried to put +0 at the end of return, and it appear as 0 for 2022. But what if i want to use COALESCE / SELECTED VALUE function. Which part do i need to put it ?
 
PengeluaranKontan diff ratio = var _currentyear = MAX('T Kontan'[Tahun])
VAR _pengeluaranKontan_CurrentYear = CALCULATE([PengeluaranKontan],'T Kontan'[Tahun] = _currentyear)
var _pengeluaranKontan_PrevYear = CALCULATE([PengeluaranKontan],'T Kontan'[Tahun]= _currentyear-1)
return DIVIDE(_pengeluaranKontan_CurrentYear -_pengeluaranKontan_PrevYear,_pengeluaranKontan_PrevYear) + 0
Anonymous
Not applicable

Thank you, but how do i combined it with my current DAX:

Pengeluaran diff ratio = var _currentyear = MAX(Buah[Tahun])
VAR _pengeluaran_CurrentYear = CALCULATE([Pengeluaran],Buah[Tahun] = _currentyear)
var _pengeluaranPrevYear = CALCULATE([Pengeluaran],Buah[Tahun] = _currentyear-1)
return DIVIDE(_pengeluaran_CurrentYear-_pengeluaranPrevYear,_pengeluaranPrevYear

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.