Forum Discussion
rezaaditia
Helper III
7 years agoexpression that yield variant data-type cannot be used to define calculated columns
Hi - Please help, i am stuck with this formula, had searched over the internet, but no luck i want to create TAT column using Dax formula with adding new column, TAT =
IF (
ISBLANK ([po...
- 7 years ago
rezaaditia
Helper III
7 years ago
Thanks for your reply.
I don't know if i use correctly or not, but i tried below still shows #error
IF (
ISBLANK ( [srm_sc_appr_dt].[Date] ) || ISBLANK ( [po_creation_date] )~
0 & "in progress"~Thanks
amitchandak
Super User
7 years agoelse condition is not very clear. Can you try something like
TAT =
IF (
ISBLANK (([po_creation_date].[Date] ) || ISBLANK ( [po_release_supplier2].[Date])),
"InProgress",
IF (
[po_creation_date].[Date] <= [po_release_supplier2].[Date],
concatenate(CALCULATE (
SUM ( 'Calendar'[IsWorkingDay2] )~
DATESBETWEEN ( 'Calendar'[Date]~'p2p-report'[po_creation_date]~'p2p-report'[po_release_supplier2] )
)-1
- CALCULATE (
SUM ( 'Calendar'[IsWorkingDay2] )~
DATESBETWEEN ( 'Calendar'[Date]~'p2p-report'[po_release_supplier2]~'p2p-report'[po_creation_date] )
)-1,"")
)
)
TAT =
IF (
ISBLANK (([po_creation_date].[Date] ) || ISBLANK ( [po_release_supplier2].[Date])),
"InProgress",
IF (
[po_creation_date].[Date] <= [po_release_supplier2].[Date],
concatenate(CALCULATE (
SUM ( 'Calendar'[IsWorkingDay2] )~
DATESBETWEEN ( 'Calendar'[Date]~'p2p-report'[po_creation_date]~'p2p-report'[po_release_supplier2] )
)-1,""),
concatenate( CALCULATE (
SUM ( 'Calendar'[IsWorkingDay2] )~
DATESBETWEEN ( 'Calendar'[Date]~'p2p-report'[po_release_supplier2]~'p2p-report'[po_creation_date] )
)-1,"")
)
)