- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dax measure / need help with a measure
Hi everyone,
I would like to do this measure :
calculate the number of interventions using the distinctcount function for which there is neither the "A61" nor the "A62" intervention, but also does not take into account other interventions including the co-response codes A61 AND A62 Here is the table. Table name: Table.
Another information: there are a lot of data like this.
Thank you, My best regards.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm sorry, but I don't understand your question.
What do you mean by "calculate the number of interventions"?
Can you tell us what result you would expect the measure to return from the sample data you posted?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@Anonymous wrote:the result will be = 3
Ah ok, So you are counting distinct values from the Codes column provided that none of the interventions for that code are A61 or A62.
One was of doing this is a measure like the following:
DCount Codes = var _excludedCol1 = CALCULATETABLE(ALLSELECTED('Table'[Codes]), FILTER(ALL('Table'),'Table'[Intervention] IN {"A61","A62"})) var _result = CALCULATE(DISTINCTCOUNT('Table'[Codes]), not 'Table'[Codes] in _excludedCol1) return _result
I basically create the first variable as a list of Codes that do have one of A61 or A62, then I exclude these codes from the distinct count.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm sorry, but I don't understand your question.
What do you mean by "calculate the number of interventions"?
Can you tell us what result you would expect the measure to return from the sample data you posted?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
to be more precise
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
the result will be = 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@Anonymous wrote:the result will be = 3
Ah ok, So you are counting distinct values from the Codes column provided that none of the interventions for that code are A61 or A62.
One was of doing this is a measure like the following:
DCount Codes = var _excludedCol1 = CALCULATETABLE(ALLSELECTED('Table'[Codes]), FILTER(ALL('Table'),'Table'[Intervention] IN {"A61","A62"})) var _result = CALCULATE(DISTINCTCOUNT('Table'[Codes]), not 'Table'[Codes] in _excludedCol1) return _result
I basically create the first variable as a list of Codes that do have one of A61 or A62, then I exclude these codes from the distinct count.

Helpful resources
Subject | Author | Posted | |
---|---|---|---|
07-03-2024 06:01 AM | |||
09-25-2024 08:50 AM | |||
09-12-2024 02:47 AM | |||
06-18-2024 12:55 PM | |||
06-19-2024 08:36 AM |
User | Count |
---|---|
140 | |
110 | |
81 | |
60 | |
46 |