Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Hi
I have a table with data like following snap. I want to write a DAX so that I can count the number of Emails. If Email count is more than 1 then sum those numbers. For example, in below snap, adam@msn.com comes three times and matt@ol.com comes twice which is more than 1..so In following example, I want to show 5 on card ( 3 times adam + 2 times matt ). combination of PersonId and Email is always going to be unique.
Solved! Go to Solution.
Hi @ani_informa
As tested under direct query connection, you could create measures instead of calculated columns.
Measure = CALCULATE(COUNT('test1$'[PersonId]),ALLEXCEPT('test1$','test1$'[Email]))
Measure 2 = COUNTX(FILTER('test1$',[Measure]>1),[Measure])
Hi @ani_informa
As tested under direct query connection, you could create measures instead of calculated columns.
Measure = CALCULATE(COUNT('test1$'[PersonId]),ALLEXCEPT('test1$','test1$'[Email]))
Measure 2 = COUNTX(FILTER('test1$',[Measure]>1),[Measure])
Hi @ani_informa ,
For your requirement you just need to create one measure which count the email id.
Hi Tahreen
I do not want to show value as per email filter.
Hi,
One way you could try and achieve this would be to first create a calculated column using something like below:
Thanks for your reply but I cannot use this because I am using DirectQuery Mode and not Import.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
81 | |
75 | |
60 | |
37 | |
33 |
User | Count |
---|---|
102 | |
56 | |
52 | |
46 | |
40 |