Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
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 September 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
25 | |
20 | |
18 | |
17 | |
16 |
User | Count |
---|---|
37 | |
20 | |
19 | |
17 | |
11 |