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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
Aurelio
Frequent Visitor

Calculate from mulitple colums to catogorize.

Good day all 

 

I have some articles in one table with the different variants. Some article are the same in NL and ES but some are different. To know which articles are different I created a new colum: 

TaalID = (IF(Sheet1[BCItemNumber_NLD] = Sheet1[BCItemNumber_ES],1,0))

 

So we have this

NLESDifference 
P11430P114300 
P10220P103701 

 

To calculate the sales I have an active relationship between Valueentries(ItemNO) and the Sheet2(NL) and one inactive relatioship between Valueentries(ItemNO) and the Sheet2(ES).  I want to see the articles with an unique ID in ES but when selecting NL I want to see all the articles even if they have a unique value in ES. 

 

I tried this but then I only see the unique ES when selecting ES but when selecting NL I don't see the any other values. 

 

Taal omzet =
var NL = (CALCULATE([Geboekte omzet]))
Var ES = (CALCULATE([Geboekte omzet],USERELATIONSHIP(Sheet1[BCItemNumber_ES],valueentries[itemNo])))
var TAAL = (SUMX(Sheet1,Sheet1[TaalID]))
return
IF(TAAL = 1 ,NL,ES)
1 REPLY 1
v-zhangti
Community Support
Community Support

Hi, @Aurelio 

 

Can you provide more sample data for testing? Sensitive information can be removed in advance. What kind of expected results do you expect? You can also show it with pictures. I look forward to your response.

 

Best Regards,

Community Support Team _Charlotte

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

 

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.