Forum Discussion
If statement doesn't allow to select columns
- Anonymous6 years ago
Hi Anonymous,
What the 'blank' means? 'blank' text or null value? If you mean the null value, you can use camargos88 's suggestion. For 'blank' text, you need to change the conditions to compare with 'blank'.
Measure = VAR qtReceiver = SELECTEDVALUE ( 'Table'[QT received] ) VAR _status = SELECTEDVALUE ( 'Table'[Status] ) RETURN IF ( qtReceiver = "blank" && _status = "Closed", 1, 0 )BTW, the above formula not suitable to use to compare with summarize row contents. For this scenario, you can try to use the following measure formula:
Measure = VAR summary = SUMMARIZE ( Table, [Name], [QT Receive], [Status], "If statement", IF ( [QT Receive] = "Blank" && _status = "Closed", 1, 0 ) ) RETURN CONCATENATEX ( summary, [If statement], "," )Regards,
Xiaoxin Sheng
Hi Anonymous,
What the 'blank' means? 'blank' text or null value? If you mean the null value, you can use camargos88 's suggestion. For 'blank' text, you need to change the conditions to compare with 'blank'.
Measure =
VAR qtReceiver =
SELECTEDVALUE ( 'Table'[QT received] )
VAR _status =
SELECTEDVALUE ( 'Table'[Status] )
RETURN
IF ( qtReceiver = "blank" && _status = "Closed", 1, 0 )
BTW, the above formula not suitable to use to compare with summarize row contents. For this scenario, you can try to use the following measure formula:
Measure =
VAR summary =
SUMMARIZE (
Table,
[Name],
[QT Receive],
[Status],
"If statement", IF ( [QT Receive] = "Blank" && _status = "Closed", 1, 0 )
)
RETURN
CONCATENATEX ( summary, [If statement], "," )
Regards,
Xiaoxin Sheng
This worked! Thanks!...