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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

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
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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