Forum Discussion
fabd
Helper I
6 years agoHow to group by ?
Hi, sorry for this basic question. I hang around the community before posting. I found some help, but i was not able to implement these advice in my case. So, i have a following table : ...
- 6 years ago
Hello @fabd ,
I'm sorry for my mistake. Please try the formula below.
Table 2 = SELECTCOLUMNS ( 'Table', "Model", 'Table'[Model], "DateMonth", 'Table'[datemonth], "CPU", 'Table'[CPU], "Frequency", 'Table'[Frequency], "RAM", 'Table'[RAM], "DistinctCount", CALCULATE ( DISTINCTCOUNT ( 'Table'[Model] ), ALLEXCEPT ( 'Table', 'Table'[datemonth] ) ) )I changed the sample data. For more information, see the attachment.
v-xuding-msft
Community Support
6 years agoHi fabd ,
Do you want to create a new table? If so, you could try like this:
Table 2 =
SELECTCOLUMNS (
'Table',
"Model", 'Table'[Model],
"DateMonth", 'Table'[datemonth],
"CPU", 'Table'[CPU],
"Frequency", 'Table'[Frequency],
"RAM", 'Table'[RAM]
)
- fabd6 years ago
Helper I
Hello Xue,
How do you make a group by to count number of Model for each year/month ?
- v-xuding-msft6 years ago
Community Support
Hello @fabd ,
I'm sorry for my mistake. Please try the formula below.
Table 2 = SELECTCOLUMNS ( 'Table', "Model", 'Table'[Model], "DateMonth", 'Table'[datemonth], "CPU", 'Table'[CPU], "Frequency", 'Table'[Frequency], "RAM", 'Table'[RAM], "DistinctCount", CALCULATE ( DISTINCTCOUNT ( 'Table'[Model] ), ALLEXCEPT ( 'Table', 'Table'[datemonth] ) ) )I changed the sample data. For more information, see the attachment.
- fabd6 years ago
Helper I
thanks xue, i am going to try