Forum Discussion
Changing Data Format
- 2 years ago
Hi Anonymous
Do you want to have a seperate table???
Like this??
then take new table from modeling tab then write thisSummarize table = SUMMARIZE(Table3,Table3[RN],
"Min CNV",CALCULATE(MIN(Table3[CVN]),ALLEXCEPT(Table3, Table3[RN])),
"Max CNV",CALCULATE(Max(Table3[CVN]),ALLEXCEPT(Table3, Table3[RN])))I hope I answered your question!
- Anonymous2 years ago
Hi Anonymous ,
If the first and last are determined by the [Score] field, try creating a calculated table with the following code:Table2 = SUMMARIZE( 'Table', 'Table'[ID], "first_CVN", VAR __min_score = CALCULATE( MIN('Table'[Score]), ALLEXCEPT('Table','Table'[ID]) ) VAR __result = CALCULATE(MAX('Table'[Cvn]),'Table'[Score]=__min_score,ALLEXCEPT('Table','Table'[ID])) RETURN __result, "last_CVN", VAR __max_score = CALCULATE( MAX('Table'[Score]), ALLEXCEPT('Table','Table'[ID]) ) VAR __result = CALCULATE(MAX('Table'[Cvn]),'Table'[Score]=__max_score,ALLEXCEPT('Table','Table'[ID])) RETURN __result )Best Regards,
Gao
Community Support TeamIf there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!How to get your questions answered quickly -- How to provide sample data in the Power BI Forum -- China Power BI User Group
Hi Anonymous ,
If the first and last are determined by the [Score] field, try creating a calculated table with the following code:
Table2 =
SUMMARIZE(
'Table',
'Table'[ID],
"first_CVN",
VAR __min_score = CALCULATE( MIN('Table'[Score]), ALLEXCEPT('Table','Table'[ID]) )
VAR __result = CALCULATE(MAX('Table'[Cvn]),'Table'[Score]=__min_score,ALLEXCEPT('Table','Table'[ID]))
RETURN
__result,
"last_CVN",
VAR __max_score = CALCULATE( MAX('Table'[Score]), ALLEXCEPT('Table','Table'[ID]) )
VAR __result = CALCULATE(MAX('Table'[Cvn]),'Table'[Score]=__max_score,ALLEXCEPT('Table','Table'[ID]))
RETURN
__result
)
Best Regards,
Gao
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data in the Power BI Forum -- China Power BI User Group