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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Anonymous
Not applicable

Calculated column not showing blank rows

Hi
I created a calculated column using following Dax
Value= VAR
Cal1=if (isblank(table1[date field1))|| ( isblank ( table 1[ date field 2])), BLANK(),Datediff( table1[field 1],table1[date field2], day))
VAR
Cal2= same as above with date field 2 and date field 3
VAR
Cal3=cal1-cal2
RETURN
If(isblank(Cal1)|| (isblank(Cal2)),BLANK(),Cal3)
Problem: when I am pulling this Value column in table visual, along with field 1,2,3; it is not showing any blank rows. So only showing rows where Value column has values. When I take Value column out, table shows all rows.
I could not find ‘show data within value’ option also
What I am doing wrong? Please help.
I tried creating measure also but getting same problem.



1 ACCEPTED SOLUTION
vivran22
Community Champion
Community Champion

Hello @Anonymous 

 

You may try this:

From the drop down option of ID column > Select Show items with no data

 

Untitled.png

 

For this, I have created the calculated column as per your scenario:

 

Column = 

VAR Col1 = IF(
            ISBLANK(Sheet1[Date 1]) || ISBLANK(Sheet1[Date 2]),
             BLANK(),
             DATEDIFF(Sheet1[Date 1], Sheet1[Date 2],DAY)
            )
VAR col2 = IF(
            ISBLANK(Sheet1[Date 2]) || ISBLANK(Sheet1[Date 3]),
             BLANK(),
             DATEDIFF(Sheet1[Date 2], Sheet1[Date 3],DAY)
            )
VAR Diff = IF(
    ISBLANK(Col1) || ISBLANK(col2),
    BLANK(),
    Col1 - col2
)
RETURN
Diff

 

Cheers!
Vivek

If it helps, please mark it as a solution
Kudos would be a cherry on the top 🙂

https://www.vivran.in/

Connect on LinkedIn

View solution in original post

3 REPLIES 3
vivran22
Community Champion
Community Champion

Hello @Anonymous 

 

You may try this:

From the drop down option of ID column > Select Show items with no data

 

Untitled.png

 

For this, I have created the calculated column as per your scenario:

 

Column = 

VAR Col1 = IF(
            ISBLANK(Sheet1[Date 1]) || ISBLANK(Sheet1[Date 2]),
             BLANK(),
             DATEDIFF(Sheet1[Date 1], Sheet1[Date 2],DAY)
            )
VAR col2 = IF(
            ISBLANK(Sheet1[Date 2]) || ISBLANK(Sheet1[Date 3]),
             BLANK(),
             DATEDIFF(Sheet1[Date 2], Sheet1[Date 3],DAY)
            )
VAR Diff = IF(
    ISBLANK(Col1) || ISBLANK(col2),
    BLANK(),
    Col1 - col2
)
RETURN
Diff

 

Cheers!
Vivek

If it helps, please mark it as a solution
Kudos would be a cherry on the top 🙂

https://www.vivran.in/

Connect on LinkedIn

Anonymous
Not applicable

Thanks a lot.
Super silly me! I was looking for show items with no data for value field only , not other fields.
Seeing your ID field made me realize that
Thanks
Thanks
amitchandak
Super User
Super User

On the dimension you have used try

ShowItemwithoutdata.JPG

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.