Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hi all,
I'm new to Power BI and DAX, so thanks in advance for helping.
I have a table named RUM:
date | |
crash@test.com | 2020-08-26 |
crash@test.com | 2020-08-27 |
test@dummy.com | 2020-08-27 |
test@dummy.com | 2020-08-27 |
dummy@dotcom.com | 2020-10-10 |
dummy@dotcom.com | 2020-10-10 |
kim@dot.com | 2020-01-01 |
I need to get number of distinct dates for each email address while at same time filttering some of emails.
From the table above result should be:
unique dates | |
crash@test.com | 2 |
test@dummy.com | 1 |
I have following DAX but I'm not totally sure if it gives the right kind of result.
unique dates =
CALCULATE(
DISTINCTCOUNT(RUM[date]),
FILTER(
RUM,
RUM[email] <> "dummy@dotcom.com" &&
RUM[email] <> "kim@dot.com"
)
)
I know there are multiple ways to do this and would prefer the simplest. Any help and comments will be highly appreciated.
Solved! Go to Solution.
I do not see any issue with what you have in your calculation. Another way to do it is:
unique dates =
COUNTROWS(
DISTINCT(
SELECTCOLUMNS(
FILTER(RUM,RUM[email]<>"dummy@dotcom.com" && RUM[email]<>"kim@dot.com"),
"date",[date]
)
)
)
@CAPSTALKER , Try like
unique dates = CALCULATE(
DISTINCTCOUNT(RUM[date]),
FILTER(RUM, not( RUM[email] in {"dummy@dotcom.com" , "kim@dot.com" })))
I do not see any issue with what you have in your calculation. Another way to do it is:
unique dates =
COUNTROWS(
DISTINCT(
SELECTCOLUMNS(
FILTER(RUM,RUM[email]<>"dummy@dotcom.com" && RUM[email]<>"kim@dot.com"),
"date",[date]
)
)
)
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 |
---|---|
10 | |
9 | |
9 | |
8 | |
8 |
User | Count |
---|---|
14 | |
12 | |
11 | |
11 | |
8 |