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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
vazino
New Member

How to use format function

Hello all,

 

I'd like to improve the formule below so that I can display "no value available" in the graph when no country has been selected. (with my formula when no country are selected the graph is empty).

I've tried several options with the format function but without success.

 

My formula :

KPI = if(HASONEFILTER(source[REGION.Country name]);CALCULATE(SUM(source[Current value]);FILTER(source;source[INDICATOR.Indicator name]="KPI"));0)

 

If someone can help that would be great! 🙂

 

Thanks a lot

2 REPLIES 2
v-lili6-msft
Community Support
Community Support

hi, @vazino

     You can add a measure as below:

measure = IF(ISFILTERED( source[REGION.Country name])=BLANK() ,"Please Select a Report Date", [KPI])

and then drag it into visual

result:

7.PNG

8.PNG

here is pbix, please try it.

https://www.dropbox.com/s/idxpd57gt16f6x2/How%20to%20use%20format%20function.pbix?dl=0

 

and this is the problem that I've seen it before, you can refer to:

https://community.powerbi.com/t5/Desktop/Switch-condition-or-If-and-Else-If-to-handle-both-condition...

 

 

Best Regards,

Lin

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

You aren't going to be able to mix text and numeric data in a measure. You will want to overlay a card visual that is either blank or "no value available" depending on whether a country is selected.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.