Forum Discussion
Number of Rows based on multiple columns values
Thank you Greg_Deckler
Maybe Im doing something wrong...This is what I did
My Columns:
[Product] [SIDE] [PROCESS] [MACH] [CT]
According with the proposal
Measure =
// I assume that __Table, __TotalCT and__Max are the variables name
// I believe that 'Table' is the name of the table where this data resides. For me this table's name is CAP_TABLE
VAR __Table = SUMMARIZE('CAP_TABLE',[Process],"__TotalCT ",SUM('CAP_TABLE'[CT])
VAR __Max = MAXX(__Table ,[__TotalCT ])
RETURN
MAXX(FILTER(__Table ,[__TotalCT ]=__Max ),[Process])
This is my logic (maybe wrong)
__TotalCT should be the MAX of [CT] for each [PROCESS] where [Product] is the same and [MACH] is different
ej
For Module A, the product has two sides, each run in different machines (SIDE 1 in Ln1 = 10 sec and SIDE 2 in Ln2=12). Since [MACH] are different the PROCESS output is 12 sec ( the machines can run at the same time, so the output will be based on the highest CT)
Once I have the Process CT, I need to compare with the rest of the PROCESS CT and the highest will be the constrain (in this case is FA=20)
I hope that this make sense to you
Thank you for your help!
- Greg_Deckler4 years agoCommunity Champion
fzn4hs I think I messed up and put the wrong column in for the summarize:
Measure = // Assumes you have [Product] column in your visual VAR __Table = SUMMARIZE('Table',[Mach],"__TotalCT",SUM('Table'[CT]) VAR __Max = MAXX(__Table,[__TotalCT]) RETURN MAXX(FILTER(__Table,[__TotalCT]=__Max),[Process])Should be a summarize by Mach, not Process.