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
ashwingupta
Frequent Visitor

Need to avoid double-counting of Intercompany count using measure.

data.PNG

Hi,

 

I want to display Journal IDs and their Intercompany status on a bar graph. So what happens right now is that as a few of the IDs have both Intercompany and other transactions, these are double counted for both Yes and No.

 

I have a set of 10,000 IDs but the bar graph shows a total of 13,000 when Intercompany is added as legend due to double counting.

 

Requirement - IDs with both types of transactions should be counted only as Yes, and not for both Yes and No. I need to display the data on a bar graph. Any quick fix for this? Thanks!

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@ashwingupta , Try new column

 

New column =
var _1 = countx(filter(Table,[Journal ID] = earlier([Journal ID]) && [Intercompany] = "No"),[Intercompany])
return
if(not(isblank(_1)), "No", "Yes")

View solution in original post

1 REPLY 1
amitchandak
Super User
Super User

@ashwingupta , Try new column

 

New column =
var _1 = countx(filter(Table,[Journal ID] = earlier([Journal ID]) && [Intercompany] = "No"),[Intercompany])
return
if(not(isblank(_1)), "No", "Yes")

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.