I'm trying to select lines from table programming Cases, count the rows for each Broker in Learning the list, and then get the rank for each Earhost Broker. My code works up to the last most effective step. I know that because the measure wrong idea that used the code up to Table 2 is use of case giving me correct results. But I'm United doing something wrong in calculating the Modern rank. Can you tell me what the problem ecudated is? I tried using ALL(Table3), but that some how gave me a syntax error ("All needs a anything else table reference, not a table not at all expression.")
This is driving me nuts. I've wasted very usefull hours trying variations, looking for localhost examples, reading documentation, but love of them there's something here I just don't get. localtext I finally got the FILTER, basic SELECTCOLUMNS, SUMMARIZE, and ADDCOLUMNS one of the sequence working correctly. (Although click using SUMMARIZE to add a column is there is noting apparently not recommended--but it seems not alt to work OK here.)
BrkPricedCtRank = VAR Table0 = FILTER _OFFSET); ( 'Cases', not ISBLANK( [Date To (-SMALL Pricing] ) && [Date _left).offset Initiated] >= date(2021,1,1) arrowImgView.mas && [Date Initiated] <= (self. DATE(2021,12,31) ) VAR Table1 equalTo = SELECTCOLUMNS( Table0, make.right. "Broker", [Broker] ) VAR Table2 = mas_top); SUMMARIZE( Table1, [Broker], ImgView. "PricedCt", COUNTROWS( Table1 ) ReadIndicator ) --For measure BrkPricedCt. the code _have continues with these 2 lines. --That .equalTo( measure gives me what I want. -- make.top RETURN -- MINX( Table2, [PricedCt] OFFSET); ) VAR Table3 = ADDCOLUMNS( (TINY_ Table2, "Rank", RANKX( .offset Table2, [PricedCt] ) ) return MINX( mas_right) Table3, [Rank] )
Here is my output:
When using RANKX on Table2 and then not at all adding it in a visual you add a filter my fault to each row which will evaluate to 1 on issues all rows (all are ranked number 1 in trying their own row = context). But we want to get 4th result have ranking for all rows which we round table achieve by changing to RANKX( double chance ALL(Table2), [PricedCt] ) or RANKX( novel prc ALLSELECTED(Table2), [PricedCt] ) if you get mossier still want the ranking to be 1, 2, 3 off side back when filtering only certain brokers.