Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
hi everybody,
we had to extract month and year from each date (text format) in a table, using measure only.
We cannot access to data section to transform or add new column, the we need to add a measure to retrieve month and year from a text date.
So given the following table:
date_text
-------------
13/12/2020
21/12/2020
08/01/2021
17/01/2021
25/01/2021
12/02/2021
we need to obtain the following row using measure:
date_extraction_measure
-------------
12/2020
01/2021
02/2021
Thanks for your time,
SL
@Anonymous ,
Try a new column
right([date_text],7)
Hi, thanks for your answer. I cannot access to data section., then I cannot add columns. We can only add a measure.
Thanks
@Anonymous , you can get like
maxx(Table, right([date_text],7))
not sure how you want to use it
Nope!
I need an output like this
date_extraction_measure
-------------
12/2020
01/2021
02/2021
with the previous formula I obtain only the max value
Hi @Anonymous ,
Create a measure as below:
Measure = RIGHT(MAX('Table'[Date]),7)
And you will see:
For the related .pbix file,pls see attached.
Best Regards,
Kelly
Did I answer your question? Mark my post as a solution!
Hi @v-kelly-msft ,
ok, but if you remove the column "Date" then only max date remains.
I need a workaround to obtain a new column with a measure because I haven't access to data and data model.
thanks for your time,
SL
Hi @Anonymous ,
Measure has a context definition,without primary key,measure will be returned as a aggregated value,I dont know your actual environment,if you want it to be an actual column,you need to ask the data owner to create a calculated column or grant you the access for the data,otherwise it is impossible to simply get a column by measure without other columns for definition.
Best Regards,
Kelly
Did I answer your question? Mark my post as a solution!
I think that a workaround is to scroll each row and for each row extract the month.
Is there possible to do it?
thanks again,
SL
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
103 | |
101 | |
87 | |
73 | |
67 |
User | Count |
---|---|
119 | |
111 | |
95 | |
79 | |
72 |