cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
SUMESHKUMAR22
Helper II
Helper II

Many to Many relationship

Hi everyone,

Based on the below data model Is it possible to modify the below Calculated table (Map_Field) ,Required to add the distinct NPI count from 'SITE_INFO' table based on the matching zipcodes.
'Map_Field' table is a reference of based table that is 'VBI Vaccines'.

Map_Field =
union(
    SUMMARIZE('VBI Vaccines','VBI Vaccines'[HCP_PRIMARY_CLINIC_ZIP_CODE],'VBI Vaccines'[NPI_NUMBER],'VBI Vaccines'[EVENT_DAY],'VBI Vaccines'[HCP_STATE],'VBI Vaccines'[HCP_CITY],"Count",DISTINCTCOUNT('VBI Vaccines'[NPI_NUMBER]),"Entity","UNIQUE HCPs REACHED"),
    CALCULATETABLE(
        SUMMARIZE('VBI Vaccines','VBI Vaccines'[HCP_PRIMARY_CLINIC_ZIP_CODE],'VBI Vaccines'[NPI_NUMBER],'VBI         Vaccines'[EVENT_DAY],'VBI Vaccines'[HCP_STATE],'VBI Vaccines'[HCP_CITY],"Count",DISTINCTCOUNT('VBI   Vaccines'[NPI_NUMBER]),"Entity","UNIQUE HCPs ENGAGED"),'VBI Vaccines'[EVENT_NAME] = "Click_Delivered"))

SUMESHKUMAR22_1-1676216693588.png


NOTE:
1. ZIP_CODE is a bridge calculated table.
2. Distinct Zipcode is always more in 'SITE_INFO' whereas, 'VBI Vaccines' table has less distinct zipcodes.

Let me know if any concerns.

Thanks in advance,
SK

0 REPLIES 0

Helpful resources

Announcements
Join Arun Ulag at MPPC23

Join Arun Ulag at MPPC23

Get a sneak peek into this year's Power Platform Conference Keynote.

PBI Sept Update Carousel

Power BI September 2023 Update

Take a look at the September 2023 Power BI update to learn more.

Learn Live

Learn Live: Event Series

Join Microsoft Reactor and learn from developers.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

Top Solution Authors
Top Kudoed Authors