Supplies are limited. Contact info@espc.tech right away to save your spot before the conference sells out.
Get your discountScore big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount
I have a column which has dates and other values (answers to questions). Is it possible to create a new column only copying the date values and excluding the other data? If so, how can I do this?
Thank you in advanced.
Javier
Solved! Go to Solution.
Hi @JCortez
You can create a new column in DAX that keeps only the date values and returns blank for anything else using this code
DateOnlyColumn =
IF (
ISBLANK([YourColumn]),
BLANK(),
IF (
NOT(ISERROR(DATEVALUE([YourColumn]))),
DATEVALUE([YourColumn]),
BLANK()
)
)
Did it work? 👍 A kudos would be appreciated
🟨 Mark it as a solution to help spread knowledge 💡
Hi @JCortez
Happy for you.
Did it work? 👍 A kudos would be appreciated
🟨 Mark it as a solution to help spread knowledge 💡
Can you add a conditional column that if you have a backlash / then it would select the date on new column. I understand you might have other text with / might have to add and additional logic if you do.
It would be good if yo provided a sample as Solution Sage mention as it may vary. You can use the Split Column option during the transformation process by highlighting the column and use some type of deliminator.
Sample provided.
Hi @JCortez
Could you provide a sample of your column data?
Did it work? 👍 A kudos would be appreciated
🟨 Mark it as a solution to help spread knowledge 💡
I would like just the date values copied from the column named Response to the New Column Response (Copy). The non date values can be left blank.
Hi,
This M code works
let
Source = Excel.CurrentWorkbook(){[Name="Data"]}[Content],
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Actual Field", type any}}),
#"Added Custom" = Table.AddColumn(#"Changed Type", "Custom", each if Value.Is([Actual Field], type datetime) then [Actual Field] else null)
in
#"Added Custom"
Hope this helps.
Hi @JCortez
You can create a new column in DAX that keeps only the date values and returns blank for anything else using this code
DateOnlyColumn =
IF (
ISBLANK([YourColumn]),
BLANK(),
IF (
NOT(ISERROR(DATEVALUE([YourColumn]))),
DATEVALUE([YourColumn]),
BLANK()
)
)
Did it work? 👍 A kudos would be appreciated
🟨 Mark it as a solution to help spread knowledge 💡
Thank you so much this worked.
Hi @JCortez
Happy for you.
Did it work? 👍 A kudos would be appreciated
🟨 Mark it as a solution to help spread knowledge 💡
User | Count |
---|---|
66 | |
60 | |
47 | |
33 | |
32 |
User | Count |
---|---|
86 | |
75 | |
56 | |
50 | |
45 |