Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
I am getting a "Expressions that yeild variant data-type cannot be used to define calculated columns" error" if I change the 0 to "". I know this is simple but need help. I have the below calculated column.
Solved! Go to Solution.
Hi, @common763
Try below measure
Days btw dates=
if(
ISBLANK(DATE1),
0,
if(
ISBLANK(DATE2),
0,
NETWORKDAYS(DATE1,DATE2)))
OR
Days btw dates =
if(
ISBLANK(DATE1),
"",
if(
ISBLANK(DATE2),
"",
convert( NETWORKDAYS(DATE1,DATE2),STRING)
)
)
My head wasnt working yesterday...all i had to do was this below...I was putting "" instead of Blank()
Days btw dates = if(ISBLANK(DATE1,0, if(ISBLANK(DATE2),0,NETWORKDAYS(DATE1,DATE2)))
to
Days btw dates = if(ISBLANK(DATE1,BLANK(), if(ISBLANK(DATE2),BLANK(),NETWORKDAYS(DATE1,DATE2)))
thanks. this works. Appreciate it.
Hi, @common763
Try below measure
Days btw dates=
if(
ISBLANK(DATE1),
0,
if(
ISBLANK(DATE2),
0,
NETWORKDAYS(DATE1,DATE2)))
OR
Days btw dates =
if(
ISBLANK(DATE1),
"",
if(
ISBLANK(DATE2),
"",
convert( NETWORKDAYS(DATE1,DATE2),STRING)
)
)
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 9 | |
| 5 | |
| 4 | |
| 3 | |
| 3 |
| User | Count |
|---|---|
| 23 | |
| 12 | |
| 11 | |
| 9 | |
| 8 |