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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
dramnath_1981
Frequent Visitor

Sales Productivity Calculatin Using DAX

Hi,

 

I have just started learning Power BI and I am finding it very difficult to calculate Sales Productivity by month.

 

I have 2 tables like Sales Booking (which has Month, Booking Amount, Channel, TL Name, Staff Name) and HeadCount (which has a month wise headcount, Channel, TL Name, Staff Name). Now, I need to do a division of Total Sales Amount (by Month) against Total Headcount for the month. This has to be in a bar chart, which shows how much the Sales amount is booked by an agent on an average every month.

 

I have tried so many combinations. But I am unable to get it right. The problem I found is either the Sales Amount or the headcount is getting summed up across all months and I have got a result which is not right. I want to supply Jan Sales Amount vs. Jan headcount and so on every month.

 

Kindly help.

 

Formulas:

Active_HC = calculate(SUM(HC[Target]),allexcept(HC,HC[Channel],HC[Reporting TL Name],HC[Staff Name]))
 
Productivity = divide(calculate(SUM('Loan'[Amount]), allexcept('Loan','Loan'[Channel],'Loan'[TL Name],'Loan'[Staff Name])),calculate(HC[Active_HC],allexcept(HC,HC[Channel],HC[Sub-Channel],HC[Reporting TL Name],HC[Staff Name])))
1 ACCEPTED SOLUTION
v-jayw-msft
Community Support
Community Support

Hi @dramnath_1981 ,

 

I tried to create some test tables and data according to your description but failed.

Here's my test tables, could you tell me the difference between them and your table structure?

1.PNG

2.PNG

Otherwise, could you please share your PBIX to me if you don't have any Confidential Information?

If so, please upload your files to One Drive and share the link here.

 

Best Regards,

Jay

Community Support Team _ Jay
If this post helps, then please consider Accept it as the solution
to help the other members find it.

View solution in original post

2 REPLIES 2
v-jayw-msft
Community Support
Community Support

Hi @dramnath_1981 ,

 

I tried to create some test tables and data according to your description but failed.

Here's my test tables, could you tell me the difference between them and your table structure?

1.PNG

2.PNG

Otherwise, could you please share your PBIX to me if you don't have any Confidential Information?

If so, please upload your files to One Drive and share the link here.

 

Best Regards,

Jay

Community Support Team _ Jay
If this post helps, then please consider Accept it as the solution
to help the other members find it.

Hi Jay,

 

Thank you so much for your help. I figured out the issue while creating sample data for you.

 

I did a mistake in the connection between 2 tables. Instead of joining month from both the tables, I had several connections like RO Code and TL Codes which is a many to many relationships.

 

When I joined the Month from both the tables, it came perfectly well.

 

Regards, Ramnath

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

Check out the June 2024 Power BI update to learn about new features.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.