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

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
databubble
Frequent Visitor

Boolean measure breaks relationship?

Hi

 

I have tables DimSalesperson and FactSales. They are related by SalesPerson

 

DimSalesperson:

SalespersonTargetTotalSales
Amit4000
Barbara5000
Carolina6000
Deng7000

 

FactSales:

InvoiceNumSalesDateSalesPersonGrossInvoiceSalesTax
123/3/2016Deng758.8592
229/3/2016Barbara154.9398.97
35/4/2016Barbara651.5662.97
414/4/2016Deng262.223.63
524/4/2016Amit674.1794.68
630/4/2016Barbara468.9326.42
78/5/2016Carolina256.989.74
817/5/2016Deng939.9797.21
…etc...…etc...…etc...…etc...…etc...

 

I added three measures to FactSales:

 

  • NetAmt = sum('Fact'[GrossInvoice]) - sum('Fact'[SalesTax])
  • DiffToSalesTarget = [NetAmt]-min('Fact'[SalesTarget])
  • MetSalesTarget = [NetAmt] > min('Fact'[SalesTarget])

 

And I have a basic table visualistion showing total netAmt for each SalesPerson. (I have included Salesperson twice - once from Dimension and once from Fact - to clarify the later problem)

 

NetAmtSalesPersonSalesperson
4173.67AmitAmit
5905.81BarbaraBarbara
2249CarolinaCarolina
4262DengDeng

 

 

I can add TargetTotalSales and DiffToSalesTarget and it behaves as expected - the values are calculated in context.

 

NetAmtSalesPersonSalespersonTargetTotalSalesDiffToSalesTarget
4173.67AmitAmit4000173.67
5905.81BarbaraBarbara5000905.81
2249CarolinaCarolina6000-3751
4262DengDeng7000-2738

 

However if I add MetSalesTarget, for each sales person in the Fact table, I get a line for every SalesPerson in the Dimension table. It is as if the relationship no longer exists.:

 

NetAmtSalesPersonSalespersonTargetTotalSalesDiffToSalesTarggetMetSalesTarget
4173.67AmitAmit4000173.67TRUE
 AmitBarbara5000 FALSE
 AmitCarolina6000 FALSE
 AmitDeng7000 FALSE
 BarbaraAmit4000 FALSE
5905.81BarbaraBarbara5000905.81TRUE
 BarbaraCarolina6000 FALSE
 BarbaraDeng7000 FALSE
 CarolinaAmit4000 FALSE
 CarolinaBarbara5000 FALSE
2249CarolinaCarolina6000-3751FALSE
 CarolinaDeng7000 FALSE
 DengAmit4000 FALSE
 DengBarbara5000 FALSE
 DengCarolina6000 FALSE
4262DengDeng7000-2738FALSE

 

What am I doing wrong? 

 

Many thanks

Liz

3 REPLIES 3
Vvelarde
Community Champion
Community Champion

@databubble

 

Hi, applied a visual filter and will work.

 

Showno.png




Lima - Peru

Hi

 

Thank you for helping with my problem.

 

I see a filter gives the results I want, but it feels like a workaround to a problem in my measure. I am new to Power BI and not sure what is good practice! Is it usual to generate and filter out the "wrong" results ?

 

Liz

 

Anonymous
Not applicable

@databubble,

Generally, we don’t drag SalesPerson fields of both table to create a visual. We only drag SalesPerson field from either DimSalesperson table or FactSales table to visuals in Power BI, this way, expected result will return.

Regards,

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.