First, we need to use IF or CASE WHEN function to define the rules.Then, we count the total number of unique transaction ID in the new field.ĬOUNT_DISTINCT(IF(Category="Stationery", Transaction ID,NULL))ĬOUNT_DISTINCT(CASE WHEN Category="Stationery" THEN Transaction ID ELSE NULL END) IF or CASE) to derive the unique transaction ID as a new field. My solution is to use conditional formula (i.e. Therefore, it explains the error message we getting where it says we should not mix aggregated metrics with dimensions. In short, if the returned result from a formula is an aggregated metric, the formula is said to have used aggregated metrics. This is an aggregation function that returns an aggregated metrics.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |