cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Martin-Prague Helper II
Helper II

Distinct count over multiple tables

 

 

Hello Experts,

 

I have a situation where I need to calculate UNIQUE NUMBER OF ENGAGED USERS.

 

In my data model people can:

  • sumbit an idea
  • like an idea
  • comment an idea

All of these activities are in diffrenet tables as follwoing image:

 

Disticnt count.JPGWhat I need is to calculate that number of unique numbers who were engaged. It means they have sumbited an idea / commented / liked.

 

If I filter on 1 idea I want to see if the somebody who sumbited and idea and at the same time liked and commented was calculated only once.

 

Please see following example for selection on IDEA = 1

Number of engaged users should be only 3.  You can see eventhougt user A has been interacted 3 times he counts only 1 time.

 

distinct count.JPGI was thinking to somehow virually union all 3 tables together and then run DISTINCTCOUNT. But still it has to follow the filter context.

 

Thanks for your help

 

Cheers!

 

Martin-Prague

3 REPLIES 3
Martin-Prague Helper II
Helper II

Re: Distinct count over multiple tables

Any ideas?

Community Support
Community Support

Re: Distinct count over multiple tables

HI @Martin-Prague ,

Unfortunate, current dax formula not support auto calculate related table fields.
I'd like to suggest you create a bridge table to link and merge these tables fields and use id to manually summary and calculate on these tables.

Optimizing Many-to-Many Calculations in DAX with SUMMARIZE and Cross Table Filtering

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin Sheng
If this post helps, please consider Accept it as the solution to help the other members find it more quickly
Learning resources: Power BI
Martin-Prague Helper II
Helper II

Re: Distinct count over multiple tables

Thanks all, at the end I build a view in SQL that combines my data into one table and then I am able to do this calculation simply in Power BI.

Helpful resources

Announcements
New Ranks Launched March 24th!

New Ranks Launched March 24th!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power BI Community!

‘Better Together’ Contest Finalists Announced!

‘Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

Arun 'Triple A' Event Video, Q&A, and Slides

Arun 'Triple A' Event Video, Q&A, and Slides

Missed the Arun 'Triple A' event or want to revisit it? We've got you covered! Check out the video, Q&A, and slides now.

Join THE global Microsoft Power Platform event series.

Join THE global Power Platform event series.

Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities.

Community Summit North America

Community Summit North America

Innovate, Collaborate, Grow. The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors