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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
SUMESHKUMAR22
Helper IV
Helper IV

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
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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