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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Peavey
Helper II
Helper II

Percent of category per department

I am trying to figure out a way to solve the following: 

There are several departments with hours spent, the hours have two different categories and I need to show per department according to the category in percent. My ultimate goal is to show a trend of the development of the hour category per department.

 

I can get the hours by dep and category, but when I choose to show it in percent, the only option is of GRAND TOTAL, and not per department.

 

Capture.JPG

 

Any tips for me?

 

Thanks,

A

1 ACCEPTED SOLUTION
v-xicai
Community Support
Community Support

Hi @Peavey ,

 

You can create measure like DAX below, then put the measure onto Value box of Clustered column chart.

 

Percentage Hour= DIVIDE (CALCULATE(SUM(Table1[Hours]),FILTER(ALLSELECTED(Table1), Table1[Dep] =MAX(Table1[Dep])&&Table1[Category] =MAX(Table1[Category]))), CALCULATE(SUM(Table1[Hours]),FILTER(ALLSELECTED(Table1), Table1[Dep] =MAX(Table1[Dep]))))

Best Regards,

Amy

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
v-xicai
Community Support
Community Support

Hi  @Peavey ,

 

Does that make sense? If so, kindly mark the proper reply as a solution to help others having the similar issue and close the case. If not, let me know and I'll try to help you further.

 

Best regards

Amy

v-xicai
Community Support
Community Support

Hi @Peavey ,

 

You can create measure like DAX below, then put the measure onto Value box of Clustered column chart.

 

Percentage Hour= DIVIDE (CALCULATE(SUM(Table1[Hours]),FILTER(ALLSELECTED(Table1), Table1[Dep] =MAX(Table1[Dep])&&Table1[Category] =MAX(Table1[Category]))), CALCULATE(SUM(Table1[Hours]),FILTER(ALLSELECTED(Table1), Table1[Dep] =MAX(Table1[Dep]))))

Best Regards,

Amy

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

VijayP
Super User
Super User

Try using Matrix instead of Table and you Will get more options . Still face problem please let me know




Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
MY Blog || My YouTube Channel || Connect with me on Linkedin || My Latest Data Story - Ageing Analysis

Proud to be a Super User!



@VijayP wrote:

Try using Matrix instead of Table and you Will get more options . Still face problem please let me know


Thanks for the tip, I have tried that but it does not make me able to visualize it as an trend. I have data for each week. 

Any idea how I can do that?

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.