Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
how to calculate average CA for each representative, I have representative code and invoice number and ca as data
is this code right :
Solved! Go to Solution.
Hi! You can use a quick measure. First, make your base measure; Total CA = SUM ('YourTable'[CA]). Next, open quick measures, click the drop down and select average per category. In the base value, put the Total CA measure. In Category put your field for representatives. This will give you average per rep.
Here is one I did with sample data based on average sales per country:
Proud to be a Super User! | |
Hi @nesrinehal20 ,
Maybe you can try formula like below:
CA_Moyen_Par_Representant =
DIVIDE (
CALCULATE ( SUM ( data[CA] ), ALLEXCEPT ( data, data[COD_REP] ) ),
CALCULATE ( COUNTROWS ( data ), ALLEXCEPT ( data, data[COD_REP] ) )
)
Best Regards,
Adamk Kong
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @nesrinehal20 ,
Maybe you can try formula like below:
CA_Moyen_Par_Representant =
DIVIDE (
CALCULATE ( SUM ( data[CA] ), ALLEXCEPT ( data, data[COD_REP] ) ),
CALCULATE ( COUNTROWS ( data ), ALLEXCEPT ( data, data[COD_REP] ) )
)
Best Regards,
Adamk Kong
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi,
Share some data to work with and show the expected result. Share data in a format that can be pasted in an MS Excel file.
Hi! You can use a quick measure. First, make your base measure; Total CA = SUM ('YourTable'[CA]). Next, open quick measures, click the drop down and select average per category. In the base value, put the Total CA measure. In Category put your field for representatives. This will give you average per rep.
Here is one I did with sample data based on average sales per country:
Proud to be a Super User! | |
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!