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! Learn more
Hi,
I have 3 tables (PrimarySales,SecondarySales and Hierarchy).
Territory Column is common among them and i have joined Hierarchy table with PrimarySales and Secondary sales table on common Key(Territory).
Now, I want to have a mesure which can give me count of Territory whose Secondary sales is <90% of Primary Sales or vice versa.
Please guide and help to achieve the same.
Can you show a depiction of how the model is set up please?
Proud to be a Super User!
Paul on Linkedin.
Ok, you need a couple of measures (+ the sum for the sales in each table)
Sales 1 where S2 > 90% =
VAR _90Threshold =
DIVIDE ( [Sum Sales 1], [Sum Sales 2] )
RETURN
IF ( _90Threshold > 0.9, 1 )
Final =
SUMX(VALUES('Hierarchy'[Region]), [Sales 1 where S2 > 90%])
Proud to be a Super User!
Paul on Linkedin.
Hi,
Many thanks for your reply ans yes same objective even i want to achieve which i rflecting in your image.However,request you to explain bit in detail for measure creation part.
The first measure, [
Sales 1 where S2 > 90%
Returns the value 1 when the division of the primary sales by the secondary sales is greater than 0.9 (90%)
The second measure,
Final
Sums these 1 values to obtain the total.
I've attached the sample PBIX file for you
Proud to be a Super User!
Paul on Linkedin.
Hi
Many thanks, this has worked for me.
However, one challange is it is giving me count which include duplicates territory names since my hierarchy table contains duplicates.
Not able to figure out to hoe to get distinct count in sumx.
Please guide/help
I'm not sure what you mean. The relationships stemming from your Hirarchy table are on the "One" side, which means they are unique values. There should be no duplicates.
Proud to be a Super User!
Paul on Linkedin.
Hierarchy table contains duplicates of territory name since its on brand level.
If any territory is bound to sell more than one brand than for that territory there is more than one record in hierarchy table.So i ahve modified your dax in to below one
Please share some non-confidential sample data or PBIX file
Proud to be a Super User!
Paul on Linkedin.
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.