Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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
Hi, thanks for your answer. I cannot access to data section., then I cannot add columns. We can only add a measure.
Thanks
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
User | Count |
---|---|
77 | |
76 | |
43 | |
30 | |
26 |
User | Count |
---|---|
97 | |
91 | |
52 | |
47 | |
46 |