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
RanHo
Helper IV
Helper IV

HELP : HOW TO CONNECT PRODUCT TABLE INTO TARGET TABLE

Good Day!

      I just want to ask how can I connect the 2 table I had so that I can compare the Product count and Target per month.
I need to get the count of Product and then compare it with a monthly target i created then show it on Matrix visual. Take note the Product Table I had is in SQL Database while the Target Table is in the Sharepoint List I made.  Here is sample tables/data and also the output I needed.

PRODUCT TABLE __ (SQL DATABASE)PRODUCT TABLE __ (SQL DATABASE)TARGET TABLE __ (SHAREPOINT LIST)TARGET TABLE __ (SHAREPOINT LIST)DESIRE OUTPUT __ ( MATRIX /TABLE VISUALDESIRE OUTPUT __ ( MATRIX /TABLE VISUAL
The Team has Target per Month, how I can achieved the Output I need? Is it possible ?any Ideas would be accepted. 
Thanks in advance!

_Ran

1 ACCEPTED SOLUTION
v-stephen-msft
Community Support
Community Support

Hi @RanHo ,

 

Here's my solution.

1.Create a calculated table with companies.

vstephenmsft_0-1666847351108.png

 

2.Create a calculated column to get the short name of company. Short names are obtained to facilitate connections. Your target table shows companies in this format.

vstephenmsft_1-1666847471615.png

 

3.Create relationships.

vstephenmsft_2-1666847597448.png

 

4.Create measures to get the product count and taget monthly.

Measure = IF(FORMAT(MAX('PRODUCT TABLE'[entry date]),"MMMM")=SELECTEDVALUE('TARGET TABLE'[MONTH]),1)
ProductCount = SUMX('PRODUCT TABLE',[Measure])
Target Monthly = IF(ISBLANK([ProductCount]),BLANK(),SUM('TARGET TABLE'[TARGET]))

vstephenmsft_3-1666847912507.png

 

 

 

 

Best Regards,

Stephen Tao

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
v-stephen-msft
Community Support
Community Support

Hi @RanHo ,

 

Here's my solution.

1.Create a calculated table with companies.

vstephenmsft_0-1666847351108.png

 

2.Create a calculated column to get the short name of company. Short names are obtained to facilitate connections. Your target table shows companies in this format.

vstephenmsft_1-1666847471615.png

 

3.Create relationships.

vstephenmsft_2-1666847597448.png

 

4.Create measures to get the product count and taget monthly.

Measure = IF(FORMAT(MAX('PRODUCT TABLE'[entry date]),"MMMM")=SELECTEDVALUE('TARGET TABLE'[MONTH]),1)
ProductCount = SUMX('PRODUCT TABLE',[Measure])
Target Monthly = IF(ISBLANK([ProductCount]),BLANK(),SUM('TARGET TABLE'[TARGET]))

vstephenmsft_3-1666847912507.png

 

 

 

 

Best Regards,

Stephen Tao

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

@v-stephen-msft  I'll accept it as solution Sir,  unfortunately not working on mine but on your sample file attached its working, so maybe I work on my database and figure it out. 

Thanks!

@v-stephen-msft why when I'm creating this measure I'm getting a error 
Measure = IF(FORMAT(MAX('PRODUCT TABLE'[entry date]),"MMMM")=SELECTEDVALUE('TARGET TABLE'[MONTH]),1)

,
error# = Too few arguments were passed to the IF function. The minimum argument count for the function is 2. but I created measure similar, do I missing something?

@v-stephen-msft I'll try this.

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.