Forum Discussion
Performing analysis on grouped data?
- Anonymous3 years ago
Hi prob_powerBI
Do you mean to sum the consumption of each day according to the date, and then divide the data into high consumption or low consumption, and then calculate the sum of consumption for each category according to this category?
Here is a test file I created based on this understanding,
1.create a new column to sum consumption of each day
Column = SUMX(FILTER('Table (2)','Table (2)'[Text Before Delimiter]=EARLIER('Table (2)'[Text Before Delimiter])),[Consumption (kwh)])2.creata a new table to summarize the data(the type definition is just for the test)Table 2 = var a=SUMMARIZE('Table (2)','Table (2)'[Text Before Delimiter],[Column])var b=ADDCOLUMNS(a,"Type",SWITCH(TRUE(),[Column]>=11,"high",[Column]<10.6,"low"))return b.3.Sum it by the type
Best Regards,
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi prob_powerBI
Do you mean to sum the consumption of each day according to the date, and then divide the data into high consumption or low consumption, and then calculate the sum of consumption for each category according to this category?
Here is a test file I created based on this understanding,
1.create a new column to sum consumption of each day
3.Sum it by the type
Best Regards,
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.