Forum Discussion
Count Based on Two Colums
Hi NPC ,
You can simply do Disttinctcount here instead of COUNTROWS.
OutageCount =
CALCULATE(
DISTINCTCOUNT(Outages[EventID]),
FILTER(Outages, Outages[CustomerID] = EARLIER(Outages[CustomerID]))
)
Please mark as solution, if it works.
Thank you Prateek97. For some reason I'm getting the "Working on it" message when I try to add the column and I get stuck there forever. Not sure if its because the table is very big.
- Anonymous2 years agoNot applicable
Hi NPC ,
It's a very simple calculation that shouldn't consume too many resources.🤔
Please try:1. Update Power BI: Ensure you're using the latest version of Power BI Desktop.
Download Power BI Desktop from Official Microsoft Download Center2. Check for large model: If you're working with a large model, it might take longer to process. Consider optimizing your data model or filtering the data before adding the column.
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 in the Power BI Forum