Forum Discussion
values from Order_By column within Summar table
- Anonymous4 years ago
Hi DavidGolden,
Did you mean the sample table that you shared has been summarized already? If that is the case, you can try to use the following formulas to create a new table if it is suitable for your requirement:
NewTable = VAR summary = SUMMARIZE ( 'Table', [Cod], [Sec], "s_prima", SUM ( 'Table'[prima] ) ) VAR mPrima = GROUPBY ( summary, [Cod], "prima", MAXX ( CURRENTGROUP (), [s_prima] ) ) RETURN FILTER ( summary, [s_prima] IN SELECTCOLUMNS ( mPrima, "prima", [prima] ) )Regards,
Xiaoxin Sheng
Hi,
Here is one way to do this:
I hope this post helps to solve your issue and if it does consider accepting it as a solution and giving the post a thumbs up!
My LinkedIn: https://www.linkedin.com/in/n%C3%A4ttiahov-00001/
Thnaks ValtteriN , can I do that within a virtual table taht has been already summarized?
I mean, the 'SecCod' table you suggest is actually a returned table from summarize function, I tryed your suggestion, but it didnt worked. Am I missing something?
- ValtteriN4 years ago
Community Champion
Hi,
You can place your previous DAX within a variable and summarize it. Do you want to have your end result as a measure or as a table? I am not sure I understood your goal correctly. - Anonymous4 years agoNot applicable
Hi DavidGolden,
Did you mean the sample table that you shared has been summarized already? If that is the case, you can try to use the following formulas to create a new table if it is suitable for your requirement:
NewTable = VAR summary = SUMMARIZE ( 'Table', [Cod], [Sec], "s_prima", SUM ( 'Table'[prima] ) ) VAR mPrima = GROUPBY ( summary, [Cod], "prima", MAXX ( CURRENTGROUP (), [s_prima] ) ) RETURN FILTER ( summary, [s_prima] IN SELECTCOLUMNS ( mPrima, "prima", [prima] ) )Regards,
Xiaoxin Sheng