Forum Discussion
campelliann
Post Patron
4 years agoNew column returning always the same value on a virtual table
Hi there, I have this table with project data, where each project lives on one row. I have several columns for each row, amongs them the beginning and ending date. Table Sample Project ID ...
- 4 years ago
campelliann I believe you want something like this:
Table = VAR __Project = SELECTEDVALUE('Triskall Complete'[Process]) VAR __Table = ADDCOLUMNS( FILTER('Triskall Complete',[Process] = __Project), "__Days",([End Date] - [Start Date]) + 0 ) RETURN __Table
campelliann
Post Patron
4 years ago
Hi ValtteriN. First and foremost thanks, I have been around this problem for a couple of days and this driving me crazy 🙂 Now I get only 1s in the last column. Note that I am trying to build a Virtual Table for a more complex problem. I just created this physical table to check how the virtual table looks. It seems that in the virtual table I am not creating a row by row count of the days...
Greg_Deckler
Community Champion
4 years agocampelliann I believe you want something like this:
Table =
VAR __Project = SELECTEDVALUE('Triskall Complete'[Process])
VAR __Table =
ADDCOLUMNS(
FILTER('Triskall Complete',[Process] = __Project),
"__Days",([End Date] - [Start Date]) + 0
)
RETURN
__Table