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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Giada_Togliatti
Post Patron
Post Patron

problem with a formula with related

Hi,

I have two samples tables with a relation: orders and people, I want do create a formula like this but it gives me an error

 

SUMX(FILTER(Orders; RELATED(People[Person]= "Anna"); Orders[Sales]*Orders[Quantity]))
How can I do?
Thank you
1 ACCEPTED SOLUTION
Pragati11
Super User
Super User

Hi @Giada_Togliatti ,

 

Try re-writing your DAX as follows. I think you have missed a closing bracket:

SUMX(

FILTER(Orders; RELATED(People[Person]) = "Anna");

Orders[Sales]*Orders[Quantity])

 

Thanks,

Pragati

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Proud to be a Super User!!

View solution in original post

7 REPLIES 7
Pragati11
Super User
Super User

Hi @Giada_Togliatti ,

 

Try re-writing your DAX as follows. I think you have missed a closing bracket:

SUMX(

FILTER(Orders; RELATED(People[Person]) = "Anna");

Orders[Sales]*Orders[Quantity])

 

Thanks,

Pragati

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Proud to be a Super User!!

amitchandak
Super User
Super User

@Giada_Togliatti , related will only work from 1-M direction. M table can use related. If they are joined, This should also work

 

SUMX(FILTER(People; People[Person]= "Anna"); Orders[Sales]*Orders[Quantity])

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
AlB
Community Champion
Community Champion

Hi @Giada_Togliatti 

What is this, a measure?

Assuming there's a 1-to-many relationship between People and Orders, you can do:

Measure =
CALCULATE (
    SUMX ( Orders; Orders[Sales] * Orders[Quantity] );
    People[Person] = "Anna"
)

 althought it would bemuch better to place People[Person] in a slicer and select Anna there. Int that case the measure would be simple and more versatile:

Measure = SUMX ( Orders; Orders[Sales] * Orders[Quantity] )

If this doesn't work share the pbix 

 

Please mark the question solved when done and consider giving a thumbs up if posts are helpful.

Contact me privately for support with any larger-scale BI needs, tutoring, etc.

Cheers 

 

SU18_powerbi_badge

Hi,

thank you, the solution with calculate works, I'm learningdax, how can I achieve the same result using RELATED, something similar to the formula I posted?

Orders in in many side while people is in one side

@Giada_Togliatti 

It doesn't make much sense to use RELATED in this scenario.

It would perhaps if you needed to obtain a value from the the Person table. You already have that value here ("Anna")

Please mark the question solved when done and consider giving a thumbs up if posts are helpful.

Contact me privately for support with any larger-scale BI needs, tutoring, etc.

Cheers 

 

SU18_powerbi_badge

 

Pragati11
Super User
Super User

Hi @Giada_Togliatti ,

 

You query is incomplete as you haven't attached anything regarding the error you are getting.

 

Thanks,

Pragati

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Proud to be a Super User!!

Hi,

the error is this:

Too many arguments were passed to the FILTER function. The maximum argument count for the function is 2.

Thanks

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors