Forum Discussion
How to create a Custom Column or New Table based with multiple Column condition
- Anonymous7 years ago
Hi buddy,
well, this is happening because you have one date being repeted, so you need something like "index column".
I create one column called "KEY" it would serve to resolve your problem, here goes the steps.
i recreate the table, now only using the summerize for column "Project":
Table = SUMMARIZE(Table1;Table1[Project])Create those 2 columns:last date = CALCULATE(LASTDATE(Table1[Date]);FILTER(Table1;Table1[Project]='Table'[Project]))Key = CONCATENATE('Table'[Project];'Table'[last date])Create on the original table this column to be referenced:Key = CONCATENATE(Table1[Project];Table1[Date])Those "key" columns you can "hide in the report view" so do impact happens.Now you can access the Name column, like this:Column = LOOKUPVALUE(Table1[Name];Table1[Key];'Table'[Key])This should do the trick,Also, sorry my bad english, it's not my native language.Any questions, ask ;)
Thank you for your reply,
but I get this error message
'A table of multiple values was supplied where a single value was expected.'
I think because I have a column that contain more than on project, In fact the final table would be like
Project 1 --- Milestone 2 --- Date1
Project2 --- Milestone 1 --- Date2
Project3 --- Milestone 3 --- Date3
Try this next one:
- fa5fou57 years agoRegular Visitor
Thank you,
In fact,
when I Have this table of more than 3000 rows, this is a specimen,
59910 CMT 1-May-19 59910 TSVR1 16-May-19 59910 TSVR2 30-May-19 59910 CB 6-Jun-19 59910 HIP 10-May-19 59874 CMT 10-May-19 59874 TSVR1 7-May-19 59874 CSRB 10-May-19 59874 TSVR2 21-May-19 59874 CB 28-May-19 59874 HIP 5-Jun-19 With this code :
Table = SUMMARIZE(Table2,Table2[PCR],"Actual Milestone",LOOKUPVALUE(Table2[HIP],Table2[DATE],LASTDATE(Table2[DATE])),"Date",LOOKUPVALUE(Table2[DATE],Table2[DATE],LASTDATE(Table2[DATE])))
I am getting this result :
Actual Milestone Date PCR
HIP 6/5/2019 59874
CB 6/6/2019 59910
The Problem as soon as I add rows (Check I added another row in the end)
59910 CMT 1-May-19 59910 TSVR1 16-May-19 59910 TSVR2 30-May-19 59910 CB 6-Jun-19 59910 HIP 10-May-19 59874 CMT 10-May-19 59874 TSVR1 7-May-19 59874 CSRB 10-May-19 59874 TSVR2 21-May-19 59874 CB 28-May-19 59874 HIP 5-Jun-19 54786 TSVR 5-Jun-19 I receive this message:
A table of multiple vales was supplied where a single value was expected :(
- Anonymous7 years agoNot applicable
Hi buddy,
well, this is happening because you have one date being repeted, so you need something like "index column".
I create one column called "KEY" it would serve to resolve your problem, here goes the steps.
i recreate the table, now only using the summerize for column "Project":
Table = SUMMARIZE(Table1;Table1[Project])Create those 2 columns:last date = CALCULATE(LASTDATE(Table1[Date]);FILTER(Table1;Table1[Project]='Table'[Project]))Key = CONCATENATE('Table'[Project];'Table'[last date])Create on the original table this column to be referenced:Key = CONCATENATE(Table1[Project];Table1[Date])Those "key" columns you can "hide in the report view" so do impact happens.Now you can access the Name column, like this:Column = LOOKUPVALUE(Table1[Name];Table1[Key];'Table'[Key])This should do the trick,Also, sorry my bad english, it's not my native language.Any questions, ask ;)