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
SUMESHKUMAR22
Helper III
Helper III

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
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