This is best Fabric, Power BI, SQL and AI community event. How do we know? The last event sold out! Save €200 with code FABCMTY200.
Register nowA new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.
Hi all i have a table where is have to consider a "Partnrer" project if it is already an "Owner". Please see the data below
If Segment is 71 then it is Owner else Partner
| PRJ | Segment | Owner/Partnrer |
| A | 71 | Owner |
| A | 1 | Partner |
| A | 2 | Partner |
| B | 3 | Partner |
| C | 71 | Owner |
| C | 13 | Partner |
| D | 71 | Owner |
I need to consider only A,C because its Partner has owner.
I created countrows(Filter(table,earlier(prj)=prj) but not working properly.
@amitchandak
Solved! Go to Solution.
@harshagraj , Try if this can help
new column =
var _cnt = countx(filter(Table, [PRJ] =earlier([PRJ]) && [Segment] =71),[PRJ])
var _cnt1 = countx(filter(Table, [PRJ] =earlier([Owner/Partnrer]) && [Segment] = "Partner"),[PRJ])
return
if(not(isblank(_cnt)) && not(isblank(_cnt1)) , "Owner", "Other")
@harshagraj , Try a new column like
new column =
var _cnt = countx(filter(Table, [PRJ] =earlier([PRJ]) && [Segment] =71),[PRJ])
return
if(isblank(_cnt),[Segment], "Owner")
Hi @amitchandak thanks for the reply but it is not giving me desired solution, in the below ss highlighted ones doesnt have a partner at all.
Partner =
VAR cnt =
COUNTX (
FILTER (
'OS Sales_Project_WonLost_VW',
'OS Sales_Project_WonLost_VW'[SF_Number]
= EARLIER ( 'OS Sales_Project_WonLost_VW'[SF_Number] )
&& 'OS Sales_Project_WonLost_VW'[Segment_code] = "0071"
),
'OS Sales_Project_WonLost_VW'[SF_Number]
)
RETURN
IF ( ISBLANK ( cnt ), 'OS Sales_Project_WonLost_VW'[Segment_code], "Owner" )
@harshagraj , Try if this can help
new column =
var _cnt = countx(filter(Table, [PRJ] =earlier([PRJ]) && [Segment] =71),[PRJ])
var _cnt1 = countx(filter(Table, [PRJ] =earlier([Owner/Partnrer]) && [Segment] = "Partner"),[PRJ])
return
if(not(isblank(_cnt)) && not(isblank(_cnt1)) , "Owner", "Other")
Hi @amitchandak the above calculations work perfectly but i have an slicer Region Code.
When i modify like this
var _cnt = countx(filter(Table, [PRJ] =earlier([PRJ]) && [Segment] =71&&[Regioncode]=selectedvalue(regoincode)),[PRJ]) it doesnt work but when i modify like this it works var _cnt = countx(filter(Table, [PRJ] =earlier([PRJ]) && [Segment] =71&&[Regioncode]="0401",[PRJ])
could you please help me on this?
Hi @amitchandak please help me to adjust the calculation so that if we select region code as 0401 then the calcuation should happen accordingly. Currently if i select 0401 it doesnt work.I dont want to hardcode
Check out the May 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 26 | |
| 25 | |
| 22 | |
| 19 | |
| 17 |
| User | Count |
|---|---|
| 42 | |
| 41 | |
| 40 | |
| 21 | |
| 20 |