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.
Hello, I just have a quick question.
So, we have a table called "Not_messaged' that has information about candidates. These fields are lastMessageDate (Date field), id (integer field), NotesMessageDate (Date field), and CallNotesLogDate (Date field).
what we want is to return a distinct count of ids that:
Do NOT have messagedLastSentDate before today's date
OR DOES NOT have callNotesLogdate = todays date
OR DOES NOT have NotesLogDate = today's date
I am trying to come up with a DAX expression that can return a distinct count of the ids. However, we are getting stuck because we're not good at DAX expressions.
Solved! Go to Solution.
You can put as many conditions as you want in a FILTER.
CALCULATE (
DISTINCTCOUNT ( Not_messaged[id] ),
FILTER (
Not_messaged,
Not_messaged[lastMessageDate] >= TODAY ()
|| Not_messaged[callNotesLogdate] <> TODAY ()
|| Not_messaged[NotesLogDate] <> TODAY ()
)
)
You can put as many conditions as you want in a FILTER.
CALCULATE (
DISTINCTCOUNT ( Not_messaged[id] ),
FILTER (
Not_messaged,
Not_messaged[lastMessageDate] >= TODAY ()
|| Not_messaged[callNotesLogdate] <> TODAY ()
|| Not_messaged[NotesLogDate] <> TODAY ()
)
)
Seems like you just don't want today's date. You can add a date filter to the visual (or page/report)! Attached is an example of a date filter using the relative date filter type.
@Anonymous please provide sample data and desired output.
I'd use the distinctcount function for DAX and then just use visual level filters to achieve what you're looking for
So something similar to
DISTINCTCOUNT('Not_messaged'[id])
I see, for the visual filters, can you do IF/OR statements?
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 |
---|---|
14 | |
11 | |
10 | |
10 | |
9 |
User | Count |
---|---|
18 | |
13 | |
12 | |
11 | |
8 |