Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
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
Solved! Go to Solution.
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
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
@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])
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
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
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
Hi @Giada_Togliatti ,
You query is incomplete as you haven't attached anything regarding the error you are getting.
Thanks,
Pragati
Hi,
the error is this:
Too many arguments were passed to the FILTER function. The maximum argument count for the function is 2.
Thanks
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 97 | |
| 74 | |
| 50 | |
| 49 | |
| 44 |