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.
jjrand
Helper I
2 years agoHi, can you please post your data in a way that's easy to copy and paste? Your question would be more likely to get answered.
See here