Reply
Raj12
Helper III
Helper III
Partially syndicated - Outbound

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
v-yangliu-msft
Community Support
Community Support

Syndicated - Outbound

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
v-yangliu-msft
Community Support
Community Support

Syndicated - Outbound

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.

Syndicated - Outbound

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

Syndicated - Outbound

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

Syndicated - Outbound

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

 

avatar user

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

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

Feb2025 NL Carousel

Fabric Community Update - February 2025

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

Top Solution Authors (Last Month)
Top Kudoed Authors (Last Month)