Forum Discussion
Group by calculation
- Anonymous3 years ago
Hi Julien74 ,
Please try:
New Table = SUMMARIZE ( 'Table', 'Table'[Serivice], 'Table'[Date], "Month", FORMAT ( 'Table'[Date], "mmmm" ), "Count", DISTINCTCOUNT ( 'Table'[ID] ) )Since measure only return scalar, you must introduce entity columns to group data. Similarly, if you want a measure, you need to create a calculated column in the original table.
Month = FORMAT('Table'[Date],"mmmm")Then new a meaure:
Count = DISTINCTCOUNT('Table'[ID])Then use [Count],'Table'[Month] and 'Table'[Serivice] in a table visual.
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
Hi thanks for your answer. I understand well it's the column on my model. But it says thats is impossible to determine a unique value for my column "date"
Hi Julien74 ,
Please try:
New Table =
SUMMARIZE (
'Table',
'Table'[Serivice],
'Table'[Date],
"Month", FORMAT ( 'Table'[Date], "mmmm" ),
"Count", DISTINCTCOUNT ( 'Table'[ID] )
)
Since measure only return scalar, you must introduce entity columns to group data. Similarly, if you want a measure, you need to create a calculated column in the original table.
Month = FORMAT('Table'[Date],"mmmm")
Then new a meaure:
Count = DISTINCTCOUNT('Table'[ID])
Then use [Count],'Table'[Month] and 'Table'[Serivice] in a table visual.
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