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
rkcasey
Frequent Visitor

Compare % of total from one fiscal year to the next

So I have data that include project information - hours worked, application impacted. I want to filter the projects to only include some types and then create a side by side bar graph with axis for the application, legend for fiscal year (comparing last year to this one) and the value percent of total.

 

I have no issues with the graph when I do it with hours worked and compare quarter to quarter but I want to compare the % for all of last year to the % for this year that is complete

5-23-2017 5-51-59 PM.jpg

I can not figure out how to write the measure for the % of total. I did write measure for the FY total that works

FY17 Total hours = CALCULATE(sum('Task data'[Hours Worked]),FILTER('Task data',RELATED('Fiscal Year'[Fiscal Year])="FY17")) but I seem to run into issues with filtering when I divide. Any ideas?

 

3 REPLIES 3
v-yuezhe-msft
Employee
Employee

@rkcasey,

What issues do you get with filtering? Please share sample data of your scenario and post expected result here so that we can provide you appropriate DAX.

Regards,
Lydia Zhang

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

5-25-2017 9-10-24 AM.jpg

That is an example of what I want.

 

Here is an example of the summary data that was used above.

Primary SystemHours Worked FY17Hours Worked FY18
Middleware154484300
Ordering Platform3318011137
Compliance Center80891948
EDW2536766
Infrastructure107823298
Printing App14327 0
MoveIt1335538
Order Generator86492271
Other17181942209
Wishbone287467569
   

The raw data include project name, type of project, project manager, Primary system, resource name, hours worked, month worked. I have another table that maps the month to the fiscal year. After I get the FY attached to the hours in excel I just do a pivot table (like above), show rows as % of column, pop it up on a bar chart and poof. I can visually compare the % from the whole of the last fiscal year to the % for just the first quarter of this fiscal year.

 

In Power BI I can easily create a graph like this showing one FY data by selecting show % of grand total but if I filter to show both years in the data they end up joined together and it won't accept FY in the legend to split them out. I know my data well but I am not a programer so my DAX is weak. I would guess that my DAX would need to select each row that is in FY17 and divide by the total of all the rows in FY17 (and show it as a %) and do it is such a way that any filters or selection that apply on the report work. Sometimes I want to group by the primary system, other times by type of project, etc. THANKS

@rkcasey

In Power BI Desktop, you can show value as "Pecent of grand total" . If you still get issues, please help to post raw data of your tables.
1.PNG



Regards,
Lydia Zhang

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

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.