cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
VegarOyfoss
Helper I
Helper I

Combine DISTINCTCOUNT in one column with not distinct in another column

Hi All

I know the Subject isconfusing, but let me try to explain

I am trying to combine/filter one DAX query with the other but I am not able to figure out how

 

My data consistes of several rows of data of which more than one row relates to one (distinct) chat. The way we distinquise one chat is per distinct ConversationID as per below - there are total of four chats

Total Chats = DISTINCTCOUNT(AskNeoData[ExpiringConversationId])

 

DAXexample.png

 

 

 

 

 

 

 

 

 

Now I would like to create some measure which would give me total chats per Language translate, or translated vs not translated. I obviously cannot count/ or distinccount on LanguageCode. I would need a measure which would give me the following results:
Total Translated = 3 (for example something like FILTER(LanguageCode <> "No Translation"))
Total Not Translated  = 1 (for example something like  FILTER(LanguageCode = "No Transslation"))

 

I know there is a function where I could take the existing 'Total Chats convID = DISTINCTCOUNT(AskNeoData[ExpiringConversationId])', and make an additional count/filter on top of it but I am unable to find the way

 

Any help would be very appreceated

 

EDIT: I know I can probably refer to the existing table and there remove duplicates of ConversationID, or even make a calcualted table on distinct...and make calculations on that, but i would still prefer, if possible, to use a measure in the original table

1 ACCEPTED SOLUTION
DataInsights
Super User
Super User

@VegarOyfoss,

 

Try these measures:

 

Total Translated = 
CALCULATE (
    DISTINCTCOUNT ( AskNeoData[ConversationId] ),
    AskNeoData[LanguageCode] <> "No Translation"
)
Total Not Translated = 
CALCULATE (
    DISTINCTCOUNT ( AskNeoData[ConversationId] ),
    AskNeoData[LanguageCode] = "No Translation"
)

 

DataInsights_0-1652710911755.png

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

1 REPLY 1
DataInsights
Super User
Super User

@VegarOyfoss,

 

Try these measures:

 

Total Translated = 
CALCULATE (
    DISTINCTCOUNT ( AskNeoData[ConversationId] ),
    AskNeoData[LanguageCode] <> "No Translation"
)
Total Not Translated = 
CALCULATE (
    DISTINCTCOUNT ( AskNeoData[ConversationId] ),
    AskNeoData[LanguageCode] = "No Translation"
)

 

DataInsights_0-1652710911755.png

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
August 1 episode 9_no_dates 768x460.jpg

The Power BI Community Show

Watch the playback when Priya Sathy and Charles Webb discuss Datamarts! Kelly also shares Power BI Community updates.

Power BI Dev Camp Session 24 without aka link and time 768x460.jpg

Ted's Dev Camp - July 28, 2022

Watch Session 24 of Ted's Dev Camp along with past sessions!

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Top Solution Authors
Top Kudoed Authors