I am trying to calculate the number of times a value occurs in a column by using calculated field. Measure can do this a bit more easily, but measure limits my usage for creating other columns and the usages in the dashboards.
City
BOS
DTW
CLE
CLE
BOS
BOS
Expected Output:
City Total
BOS 3
CLE 2
DTW 1
Using the the option of Groupby in the query editor neglects the other columns which are on my data.
If you want your output as its own table then you can do:
CityCount = SUMMARIZECOLUMNS(Cities[City], "Total", COUNT(Cities[City]))
If you want it as a calculated column:
Total = COUNTROWS(FILTER(Cities, Cities[City] = EARLIER(Cities[City])))
(Assuming your table name is Cities.)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With