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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
DearestYoki
Frequent Visitor

Replacing BLANK with text in a particular period

Hi all,

 

I am currently facing a issue of replacing BLANK with "No" inside my measure and only showing last 4 weeks value.  1.PNG 

What I want to display is actually W6, W7, W8, W9, and replace all blank values with "No".

The formula for Call is:

CALL L4W =
var lastvdate = [LAST VISIT DATE FOR ALL CUSTOMER]
VAR L4WSTART= [Last 3 Weeks No.]
return
CALCULATE(MAXX(Last_Call_Within_Route_Plan,Last_Call_Within_Route_Plan[Call_Visited_Flag]),Last_Call_Within_Route_Plan[VISIT_DT]>=L4WSTART && Last_Call_Within_Route_Plan[VISIT_DT]<=lastvdate)
 
If I use IF(ISBLANK([CALL L4W],"No",[CALL L4W]))
or COALESCE([CALL L4W],"No") Then all weeks are displayed instead of last 4 weeks.
2.PNG
Thanks & Regards,
Yoki
2 REPLIES 2
v-shex-msft
Community Support
Community Support

Hi @DearestYoki,

Can please share some dummy data with a similar data structure and expected results? It should help us clarify your scenario and test to coding formula.

How to Get Your Question Answered Quickly  

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
amitchandak
Super User
Super User

@DearestYoki , Try a measure like

0 between range
Measure = var _1= IF(ISBLANK([CALL L4W],"No",[CALL L4W]))

var _min = minx(ALLSELECTED('Calendar'), 'Calendar'[Date])
var _max = maxx(ALLSELECTED('Calendar'), 'Calendar'[Date])
return
CALCULATE(if(max('Calendar'[Date]) <_min || max('Calendar'[Date]) >_max , BLANK(), _1))

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.

Top Solution Authors