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

The FabCon + SQLCon recap series starts April 14th at 8am Pacific. If you’re tracking where AI is going inside Fabric, this first session is a can't miss. Register now

Reply
Anonymous
Not applicable

Returning a value

Hello,

 

How can I write a measure that if the value to be 0 to return it as No Value rather than Blank. 

 

Scenario: 

I have Three tables Request ID, Priority, and Technician. The slicer is already set to show only those Request IDs assigned for that technician. 

 

How can I write a measure to show a specific priority for that technician and if there isn't any assigned to him this month - to return 0 or a text "No Value"

 

I have tried the following but it kept giving me an error: 

Assigned_P4 = if(ISFILTERED('Priorities'[Request ID], FIRSTNONBLANK('Priorities'[Priority],0), 1)))) 
1 ACCEPTED SOLUTION

@Anonymous I don't know, seems to work. See attached PBIX file below sig, Page 16

Greg_Deckler_0-1600077985471.png

 



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...

View solution in original post

8 REPLIES 8
amitchandak
Super User
Super User

@Anonymous , +0  can help typically

 

Try like

Assigned_P4 = if(ISFILTERED('Priorities'[Request ID]), FIRSTNONBLANK('Priorities'[Priority],0)+0, 1)

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

@amitchandak 

Hey, 

 

This only keeps returning a 1 

dobregon
Impactful Individual
Impactful Individual

Hi,

 

I think the if is the solution

 

if((valueanalysie)=0,"No Value",value)



Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)
Greg_Deckler
Community Champion
Community Champion

@Anonymous Try:

 

 

Assigned_P4 = 
  VAR __Calc = <some calculation>
RETURN
  IF(ISBLANK(__Calc),0,__Calc)

or

Assigned_P4 = 
  VAR __Calc = <some calculation>
RETURN
  IF(ISBLANK(__Calc),"No value",__Calc)

or

Assigned_P4 = 
  VAR __Calc = <some calculation>
RETURN
  __Calc + 0

 

What is the error? Sample data would help.

 

Which one works will depend on data type of __Calc

 



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...
Anonymous
Not applicable

@Greg_Deckler 

This doesn't work or perhaps I wasn't able to replicate it on my file

 

Created TimeRequest IDTechnicianStatusPriority
02/06/2020100100AOpenP4
15/04/2020100101BOpenP1
30/05/2020100102CAwaiting Customer FeedbackP4
26/06/2020100103DClosedP2
17/18/2020100104AOpenP2
17/18/2020100105BClosedP4
14/09/2020100106COpenP4
14/09/2020100107DClosedP4
14/09/2020100108AAwaiting Customer FeedbackP2
14/09/2020100109AClosedP1

 

They're in separate tables but I have already done the relations between tables and calendar and it's working fine.

Let's say I have the above sample and I require to add 

 

number of Completed Problems Assigned

number of Current Problems assigned

@Anonymous I don't know, seems to work. See attached PBIX file below sig, Page 16

Greg_Deckler_0-1600077985471.png

 



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...
Anonymous
Not applicable

@Greg_Deckler Hi, 

 

It's not working for some reason - see the screenshot below,Capture.PNG please. 

@Anonymous You need an extra closing paren ")" at the end of your first row.



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.