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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Raj12
Helper III
Helper III

Measure returning value from a connected table ignoring other table selection

Table 1 (LFSLTRNR) has monthly sales for an agent

Table 2 (Agents Target) has monhtly target for an agent.

Table 1 and 2 are connected via agent code

 

Report has Sale date filter from table1 and measure showing agent target for that slected month.

If there is no sale for an agent in a month then their target is coming as blank in the measure, but I want to show target even if there is no sale data in table 1 for an agent i.e. ignoring connection between two table when there is no sale.

 

Measure=

var yrs = SELECTEDVALUE(LFSLTRNR[STRNDT_YEAR])
var mon_start_date =     CALCULATE(Min(LFSLTRNR[STRNDT_Month] ),ALLSELECTEDLFSLTRNR[STRNDT_Month] ))
var mon_end_date =     CALCULATE(MaxLFSLTRNR[STRNDT_Month] ),ALLSELECTED(LFSLTRNR[STRNDT_Month] ))
var agent = SELECTEDVALUE('Team Details (Prop track)'[Sales Code])
return
CALCULATE(SUM('Agents Target'[Value]),
'Agents Target'[Sales Code]=agent,
'Agents Target'[Month]>=mon_start_date && 'Agents Target'[Month]<=mon_end_date && 'Agents Target'[Year]=yrs)

Raj12_0-1718962830222.png

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Thanks for the reply from @lbendlin , please allow me to provide another insight: 

Hi  @Raj12 ,

Do you want to display the data that table LFSLTRNR shows as null values in measure.

You can click to show items with no data.

vyangliumsft_0-1719198499202.png

vyangliumsft_1-1719198499204.png

 

Best Regards,

Liu Yang

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
Anonymous
Not applicable

Thanks for the reply from @lbendlin , please allow me to provide another insight: 

Hi  @Raj12 ,

Do you want to display the data that table LFSLTRNR shows as null values in measure.

You can click to show items with no data.

vyangliumsft_0-1719198499202.png

vyangliumsft_1-1719198499204.png

 

Best Regards,

Liu Yang

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

Hi, Thank you for your response. Measure is not working for the agent where there is no sale eg. for PAG:

Raj12_0-1719574092104.png

This is the issue that I was facing where agent target is not showing when there is no sale in a month for an agent. Please help on this. Thanks

lbendlin
Super User
Super User

Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).

Do not include sensitive information or anything not related to the issue or question.

If you are unsure how to upload data please refer to https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...

Please show the expected outcome based on the sample data you provided.

Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...

PFB data:
Agents Target Table

YearMonthSales Code Value
20241Agent1515
20241Rax4545
20242Aga2323
20242Agent1316
20242Pag1212
20242Rax6767
20243Agent1751

 

LFSLTRNR

Agent CodeStrndtStrndt_Month  Strndt_Year
AGA13/02/2024 00:00  22024
Agent11/01/2024 00:00  12024
Agent13/02/2024 00:00  22024
Agent14/03/2024 00:00  32024
Rax11/01/2024 00:00  12024

 

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

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