98.7% Of all customers recommend us, we're so confident about our results we publish all reviews and stats
View Live Stats View ReviewsForum home » Delegate support and help forum » Microsoft Power BI training and help » Countif & Displaying Frequency
Countif & Displaying Frequency
Resolved · Low Priority · Version 2016
Lou has attended:
Power BI Modelling, Visualisation and Publishing course
Excel VBA Introduction course
Countif & Displaying Frequency
Hi!
I am trying to show the frequency of contact to our constituents. I would usually do this by using countif in excel, pasting back the values, de-duping and then creating a chart based on the countif column that would count the number of constituents. so a table would have headings of "# times contacted" and "count" and values would show that 250 people have been contacted twice, 400 people have been contacted 3 times and so on.
I don't seem to be able to do this in BI!
Any help welcome!
Thanks,
Lou
RE: Countif & Displaying Frequency
Hi Lou,
Thank you for the forum question.
Countif and Sumif are not straight forward in DAX. To create a Countif column you will need a very special DAX function called Earlier. It will test all the rest of the rows up against the row it is in.
If you have a look at the link below, you will find the solution you need.
https://www.goodly.co.in/countif-power-bi-dax/
Kind regards
Jens Bonde
Microsoft Office Specialist Trainer
Tel: 0207 987 3777
STL - https://www.stl-training.co.uk
98%+ recommend us
London's leader with UK wide delivery in Microsoft Office training and management training to global brands, FTSE 100, SME's and the public sector
RE: Countif & Displaying Frequency
Hi Lou,
Earlier test each row in the in the table you have the column calculation in (In the column you use Earlier to CountIf). It will not understand related tables.
I need to have a better understanding of your data model. If you want to "Countif" something, where the criteria is in another table the method will be different.
Can I please ask you to take a screenshot of your data model and explain, in which column you want to count something and where you get the criteria from.
You can send it to: info@stl-training.co.uk
Kind regards
Jens Bonde
Microsoft Office Specialist Trainer
Tel: 0207 987 3777
STL - https://www.stl-training.co.uk
98%+ recommend us
London's leader with UK wide delivery in Microsoft Office training and management training to global brands, FTSE 100, SME's and the public sector
Welcome. Please choose your application (eg. Excel) and then post your question. Our Microsoft Qualified trainers will then respond within 24 hours (working days). Frequently Asked Questions
Any suggestions, questions or comments? Please post in the Improve the forum thread. |
Power BI tip:General ShortcutsCtrl + S: Save the report or dashboard. |