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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
aausten22
Helper I
Helper I

Value not showing from measure in text box

Hi All, 

 

I am using a text box which will then change the values in certain places depending on the slicer - this works great

The issue is that I am trying to use a measure that counts the amount of times a certain value shows up and now it comes up with a little icon that its not working (see below).

aausten22_0-1677640834208.png

 

Here is the formula for the measure - I am ideally wanting it to count multiple values which are "21-30","31-40" & "40+"

HighLeaveBal = CALCULATE(COUNTROWS('Data Set - Leave Liability'),SEARCH("21-30",'Data Set - Leave Liability'[Total Day Range],,0))
 
Have tried a few different ways of doing it though its not coming up
1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@aausten22 , You should in if the values are absolute or Search with OR

 

HighLeaveBal = CALCULATE(COUNTROWS('Data Set - Leave Liability'),Filter('Data Set - Leave Liability',  SEARCH("21-30",'Data Set - Leave Liability'[Total Day Range],,0) ||

SEARCH("31-40",'Data Set - Leave Liability'[Total Day Range],,0) ||
SEARCH("40+",'Data Set - Leave Liability'[Total Day Range],,0)

) )

 

 

or

 

HighLeaveBal = CALCULATE(COUNTROWS('Data Set - Leave Liability'),Filter('Data Set - Leave Liability',  'Data Set - Leave Liability'[Total Day Range],,0) in {"21-30" ,"31-40",' "40+"}

) )

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

View solution in original post

3 REPLIES 3
amitchandak
Super User
Super User

@aausten22 , You should in if the values are absolute or Search with OR

 

HighLeaveBal = CALCULATE(COUNTROWS('Data Set - Leave Liability'),Filter('Data Set - Leave Liability',  SEARCH("21-30",'Data Set - Leave Liability'[Total Day Range],,0) ||

SEARCH("31-40",'Data Set - Leave Liability'[Total Day Range],,0) ||
SEARCH("40+",'Data Set - Leave Liability'[Total Day Range],,0)

) )

 

 

or

 

HighLeaveBal = CALCULATE(COUNTROWS('Data Set - Leave Liability'),Filter('Data Set - Leave Liability',  'Data Set - Leave Liability'[Total Day Range],,0) in {"21-30" ,"31-40",' "40+"}

) )

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

I went through the data and looks like for that one filter there are no records - how can I get it to display a 0 if there is nothing there?

I have tried both of these and they are both not working.

The first one comes up with the same issue and the second one just errors the whole text box

 

Thank you for your efforts though!

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.