Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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)
)
)
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
22 | |
7 | |
6 | |
6 | |
6 |
User | Count |
---|---|
27 | |
12 | |
10 | |
9 | |
6 |