Forum Discussion
Countifs in DAX
I know the RankX works but I have a table with ~30K records and using it I keep getting memory errors, even with 32GB of RAM. It's just too heavy to run on large datasets. That's why I am still looking for a solution, RankX is not really an option for this.
v-haibl-msft sorry to bring you into this but you help me greatly before. Do you know if the "=Countifs()" from Excel can be replicated in DAX without using RankX? I've uploaded sample data in an earlier post.
joerykeizer a few comments from me.
1. RANKX is the correct formula for what you need.
2. 30k records is a tiny tiny data model (micro in fact).
If you have performance issues with this size data model, it is most likely because your table strucutre is not optimal. How many columns do you have in your data table? I am guessing it is quite a few. Your aim should always be to only bring in columns you need, and also unpivot data when possible. Generally speaking, a table with 5 columns and 300k rows will be much faster than a table with 15 columns and 30k rows.
Can you share your table structure?
- shedoken8 years agoFrequent Visitor
Hi Guys,
I am very new to PowerBI and knows nothing about DAX. I have the excel formula in the image below. Basically i want to know how to write a DAX formula that counts how many times the SERIAL NUMBER occured in a specific month, for the example below i filtered the pivot only October 2016 but i will be displaying 13months as you can see in the table in the top.