Forum Discussion
Anonymous
2 years agoNot applicable
Create new table using another table
Hi, I am trying to groupby a table and want to create new table from that: From the above dummy tableI want to create the below table 'AggregatedTable', "NoofTest" is count of all rows c...
- 2 years ago
Hi Anonymous ,
Based on the sample and description you provided, Please try code as below.
AggregatedTable = ADDCOLUMNS( GROUPBY( TABLENAME, TABLENAME[Source], TABLENAME[KPI], "NoofTest", COUNTX(CURRENTGROUP(),COUNTROWS(TABLENAME)) ), "PassTests", COUNTX(CALCULATETABLE(TABLENAME,TABLENAME[Difference]=0),COUNTROWS(TABLENAME)) )Result is as below.
Best Regards,
Yulia Yan
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
ryan_mayu
Super User
2 years agoAnonymous
what's the expected output based on the sample data you provided?
could you pls provide a table of output as well?