Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors