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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
vchauhan011
Frequent Visitor

How to take total of one type of work per month

Hello,

 

I have data set which contains months, Types of work and hours for each type of work per month. I want to show total hours per month in clustered chart A and in the clustered chart B I want to show hours for each work streem. I want to set it up in a way so that when I select any month in clustered chart A,  it shows total number of hours per each work streem for that month in clustered chart B and when nothing is selected it in clustered chart A, It shows total number of hours year to date per work type.    

 

 

 

 

 

2020-01-27_16-22-01.png2020-01-27_16-41-35.png2020-01-27_16-41-21.png

1 ACCEPTED SOLUTION
d_gosbell
Super User
Super User

To do this you should structure your data so that you have 3 columns Month, WorkType and Amount. (you can do this with an "unpivot" transformation)

 

 

View solution in original post

4 REPLIES 4
v-shex-msft
Community Support
Community Support

HI @vchauhan011,

As d_gosbell said, you can consider doing 'unpivot columns' on your month field and write measure formula to achieve your requirement:

Unpivot columns (Power Query) 

 

Measure =
CALCULATE (
    SUM ( Table[Hour] ),
    ALLSELECTED ( Table ),
    VALUES ( Table[Work] ),
    VALUES ( Table[Month] )
)

 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

Thank you very much for your suggetion! 

d_gosbell
Super User
Super User

To do this you should structure your data so that you have 3 columns Month, WorkType and Amount. (you can do this with an "unpivot" transformation)

 

 

Thank you very much for your help! 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.