Forum Discussion
Power Query / Power pivot countifs from multiple tables
You can use something like:
List.Count(List.Select(Table_1[Date], each _ = [Date]))
That is:
List.Count - Count items in a list
- List.Select - Only include item in the list that match a criteria
- - Table_1[Data] - Get the column "Data" for Table_1 as a list
- - each _ = [Date] - The criteria, for each item in the list, check if it "_" is equal to the current row's Date field.
Thank you for your reply. I tried this as a calculated column in a table containing unique date/attribute combo's. This is what I get:
Also not sure how this would work as there is no mention of attribute, and I'm specifically looking for counting date/attribute combinations.
- artemus5 years agoMicrosoft Employee
You would add this as a custom column to your table which has distinct date/attribute.
For attribute, simply replace [Date] with [Attribute] when you add another column.
- artemus5 years agoMicrosoft Employee
If your looking for just the count of the combinations then, all you need to do, is apply a Group by on the main table, selecting both the Date and Attribute columns.
- Anonymous5 years agoNot applicable
No I am looking for a table that has counts for unique dat/attribute combo's from two other tables. Pls let me know what is not clear about the screenshot I posted in the opening post, with the intended end result. Thank you! 🙂