Forum Discussion
Stuznet
Helper V
7 years agoConcatenation or Combinevalues with Conditional
Hi guys,
I have 3 columns: Month, Day, Year when I combined them together
Column = [Month] &”/“& [Day] &”/“& [Year]
it gave me the result what I wanted but the new column contains blank with combined value of “/“ .
How do I write a conditional if concantenate is blank do not include “/“ symbol.
Really appreciated if someone can help me out.
I have 3 columns: Month, Day, Year when I combined them together
Column = [Month] &”/“& [Day] &”/“& [Year]
it gave me the result what I wanted but the new column contains blank with combined value of “/“ .
How do I write a conditional if concantenate is blank do not include “/“ symbol.
Really appreciated if someone can help me out.
DAX Solution:
DAX = IF ( Table1[Month] = BLANK() || Table1[Day] = BLANK() || Table1[Year] = BLANK (), BLANK (), COMBINEVALUES ( "/", Table1[Month], Table1[Day], Table1[Year] ) )You could wrap the FALSE statement inside of DATEVALUE to convert the TEXT string into a DATE type as below.DAX = IF ( Table1[Month] = BLANK() || Table1[Day] = BLANK() || Table1[Year] = BLANK (), BLANK (), DATEVALUE ( COMBINEVALUES ( "/", Table1[Month], Table1[Day], Table1[Year] ) ) )
2 Replies
- ChrisMendoza
Resident Rockstar
DAX Solution:
DAX = IF ( Table1[Month] = BLANK() || Table1[Day] = BLANK() || Table1[Year] = BLANK (), BLANK (), COMBINEVALUES ( "/", Table1[Month], Table1[Day], Table1[Year] ) )You could wrap the FALSE statement inside of DATEVALUE to convert the TEXT string into a DATE type as below.DAX = IF ( Table1[Month] = BLANK() || Table1[Day] = BLANK() || Table1[Year] = BLANK (), BLANK (), DATEVALUE ( COMBINEVALUES ( "/", Table1[Month], Table1[Day], Table1[Year] ) ) )- Stuznet
Helper V