cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Reply
M_nwadibia
Resolver III
Resolver III

expression to Replace a blank date with current DATE in ssrs

Hello,

I have this weekly report I distribute every monday. I find situations where dates are blank as displayed below and all data is displayed in the previous week bar. I need an expression to replace the blank date with current date so that I can have the fourth bar instead of 3 bars as shown below. Your suggestions will be appreciated.

 

 

M_nwadibia_0-1672073269735.png

 

2 ACCEPTED SOLUTIONS

Hello,

I tried implementing this  but I get this error below . How can I clear the error?

iif(Fields!WeekStart.Value = Blank(), Today(), Fields!WeekStart.Value)

M_nwadibia_0-1672769916983.png

M_nwadibia_1-1672769986838.png

 

 

View solution in original post

Hi @M_nwadibia,

 

sorry, my fault. Blank doesn't work in ReportBuilder.
Please try the following:

=iif(cstr(Fields!WeekStart.Value) = "", Today(), Fields!WeekStart.Value)

 

Liked this post? More Content on:
https://www.youtube.com/channel/UC2lAgCgfyLCHsRv0h-ETBWQ

View solution in original post

6 REPLIES 6
TOK
Helper II
Helper II

Hi M_nwadibia,

this should work: =iif(Fields!Date.Value = Blank(), Today(), Fields!Date.Value)

Liked this post? More Content on:
https://www.youtube.com/channel/UC2lAgCgfyLCHsRv0h-ETBWQ

Hello,

I tried implementing this  but I get this error below . How can I clear the error?

iif(Fields!WeekStart.Value = Blank(), Today(), Fields!WeekStart.Value)

M_nwadibia_0-1672769916983.png

M_nwadibia_1-1672769986838.png

 

 

Hi @M_nwadibia,

 

sorry, my fault. Blank doesn't work in ReportBuilder.
Please try the following:

=iif(cstr(Fields!WeekStart.Value) = "", Today(), Fields!WeekStart.Value)

 

Liked this post? More Content on:
https://www.youtube.com/channel/UC2lAgCgfyLCHsRv0h-ETBWQ

ouaelaam
Resolver I
Resolver I

You can create a simple calculated date column with a formula like below :


Date_Adjusted =
IF ( ISBLANK ( 'Table'[Date] ), TODAY (), 'Table'[Date] )

✔️

If this post is helpful, please consider marking it as a solution so that other users may find it more easily.

Oh I did not mention that this is SSRS expression and not power Bi. Thanks

Ah sorry I thought it was Power BI.

Helpful resources

Announcements
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors