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

The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!

Reply
Bernie6808
Frequent Visitor

Cost Recovery

I have a large set of data comprised of budget lines, each with a 'Award_Year' 'Cost' and 'Price'. Each budget line belongs to a project, which belongs to one or more funders and departments. Each department belongs to a faculty. All of this data in contained within each budget line. My X Axis will always show 'Cost Recovery' which is calculated as 'Price' / 'Cost' (with an 'If' statement to avoid #DIV/0 errors)

 

I can group the budget lines table by Faculty/year, Department/year or Funder/year in the query editor, but I then lose the ability for users to drill into a data point because the data is grouped before it gets into the chart:

Bernie6808_0-1699082659247.png

Can anyone point me to a way to show the data sliced in any way without grouping first, to allow users to drill down?

1 ACCEPTED SOLUTION
Ritaf1983
Super User
Super User

Hi @Bernie6808 

If I understood you correctly and you want to give users the option to choose by wich category they want to group the measure you can use field parameters.

https://www.youtube.com/watch?v=5vLBnrPyPgc

if it is something else 

Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
https://community.powerbi.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-...
Please show the expected outcome based on the sample data you provided.

https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523

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

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

View solution in original post

2 REPLIES 2
Bernie6808
Frequent Visitor

Thanks @Ritaf1983 and sorry if I didn't provide enough information.

 

Here's an example of my data:

 

Project_IDAward_YearDepartment_CodeFunder_CategoryCostPriceCost_Recovery
8436982021PHSSCouncils37093.1137093.11100%
8436982022EESCouncils3008.6300%
8436982022PHSSCouncils40161.8400%
8436982023PHSSCouncils168.2400%
8436982023PHSSCouncils9455.8700%
8436982023PHSSCouncils4549.5800%
8436982023PHSSIndustry & Commerce71407140100%
8436982023PHSSIndustry & Commerce36003600100%
8436982023PHSSIndustry & Commerce600600100%
8436982023PHSSIndustry & Commerce36003600100%
8439532023HCSGovernment Departments21418.9110854.7751%
8439532023HCSGovernment Departments8259.784823.7658%
8439532023HCSGovernment Departments66.9316.8325%
8439532023HCSGovernment Departments1760.18443.0125%
8442692023BIOCouncils20002000100%
8442692023BIOCouncils10001000100%
8442692023BIOCouncils26389.6527346104%
8442692023BIOCouncils3917.5200%
8442692023BIOCouncils29749.5100%
8442692023BIOCouncils24.9200%

 

Cost_Recovery will always be on the x-axis of my chart. Users will want to filter or drill into the data using any combination of fields, but because Cost-Recovery is a percentage it would need to be calculated 'on the fly' wth each dissection of the data; it can't be expressed as sum or percentage of the ungrouped data above.

 

I know how to group the data in the query editor, but by doing this I lose the ability for users to drill into the data.

Ritaf1983
Super User
Super User

Hi @Bernie6808 

If I understood you correctly and you want to give users the option to choose by wich category they want to group the measure you can use field parameters.

https://www.youtube.com/watch?v=5vLBnrPyPgc

if it is something else 

Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
https://community.powerbi.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-...
Please show the expected outcome based on the sample data you provided.

https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523

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

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

Helpful resources

Announcements
FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.