Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hello everyone,
Thank you for your time, I'm struggling creating a measure, hopefully you guys can help me.
Basically it's a countifs in excel but I just can make it work in DAX. Here's an example in excel:
I need to replicate that in PBI (Measure, column in light blue). The problem is that I can't make it count each variable in the columns that I'm using, here's what I have so far:
I tried using the grouby option but it would take away other columns that I need after this gets done. I highly appreciate any help given! Thank you for your time!
Solved! Go to Solution.
Hi, @Anonymous ,
In this case you need to use EARILER(). (see screenshot below)
Column =
CALCULATE (
COUNT ( Sheet1[Date] ),
'Sheet1'[Customer ID] = EARLIER ( Sheet1[Customer ID] ),
'Sheet1'[Date] = EARLIER ( Sheet1[Date] ),
ALL ( Sheet1 )
)
Mark this post as solution if this helps,thanks!
Hi @DavisBI,
I also have a similar problem, however I am not getting the desired outcome from the solution that you provided. I am attaching a screenshot, kindly please take a look at it.
So what I want is that, if Ash's name pops up for the first time for Forbes then the count should be 1. However, if it again pops up for the same company i.e. Forbes for Ash, then I want it to count as 2, as it is coming for the 2nd time and so on.
I am attaching an excel sample also, for you to understand what excel formulae I am using.
I hope this helps. Kindly please help. I am also open to alternate solutions.
Thank you,
Regards,
Saumitra Upadhyaya
Hi, @Anonymous ,
In this case you need to use EARILER(). (see screenshot below)
Column =
CALCULATE (
COUNT ( Sheet1[Date] ),
'Sheet1'[Customer ID] = EARLIER ( Sheet1[Customer ID] ),
'Sheet1'[Date] = EARLIER ( Sheet1[Date] ),
ALL ( Sheet1 )
)
Mark this post as solution if this helps,thanks!
Davis!
Thank you so much for your help! This is exactly what I was looking for!
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
47 | |
26 | |
19 | |
14 | |
10 |
User | Count |
---|---|
57 | |
49 | |
44 | |
18 | |
18 |