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
I have a problem trying to create a measure that would calculate a value based on certain criteria.
Model contains four tables:
- products (primary)
- deals (primary)
- sales
- pantheon
Relationships:
I would like to calculate average of a column in pantheon based on filters from products and then display that measure on dimDeals.
This is my current measure, which is not working:
So, I want to calculate average of ergo_trasferna_cena for deal id where products primary classification is same to the one of the deal id and SM is 1.
I hope I explained it good enough.
Here's a screenshot of data that I get (card) and expected data: (table)
It returns the same value.
@aljazg
Are [sm] and [primary] are measures or columns? Where do you show the results? then what fields are already added there?
Try this one please:
tp_test =
CALCULATE (
AVERAGE ( Pantheon[ergo_trasferna_cena] ),
FILTER ( ALL ( Pantheon ), [SM] = 1 ),
FILTER ( ALL ( Products ), Products[Primary_classification] = [primary] )
)
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.