Create Data - PowerBI (Newbie)

psycoperl

Active Member
Joined
Oct 23, 2007
Messages
339
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
  2. MacOS
  3. Web
I am new to PowerBI so I appreciate any help you can provide me.

I have two tables that I have added to my PowerBI Desktop file (LevelList and SCFE_ResponseRate)

in SCFE_ResponseRate I have data on a granular level By Year, STRM, Division, Level. The data being Number of Classes, Surveys Sent, Responses, ResponseRate

I would like to display a high level by Year/STRM level Now many Surveys were sent and how man responses were received. Then have the Response Rate calculated (Responses/Surveys Sent)

How can I do this. When I try to use the existing ResponseRate column, it just adds up the existing percentages in the field and does not calculate it.
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
Not sure if I am understanding this correctly, but I suspect that you need to use the "Group By" feature, then create a custom column to calculate the response rate:

Power Query:
let
    Source = Excel.CurrentWorkbook(){[Name="SCFE_ResponseRate"]}[Content],
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"Year", Int64.Type}, {"STRM", type text}, {"Surveys Sent", Int64.Type}, {"Responses", Int64.Type}}),
    #"Grouped Rows" = Table.Group(#"Changed Type", {"Year", "STRM"}, {{"Surveys Sent", each List.Sum([Surveys Sent]), type nullable number}, {"Responses", each List.Sum([Responses]), type nullable number}}),
    #"Added Custom" = Table.AddColumn(#"Grouped Rows", "Response Rate", each [Responses]/[Surveys Sent]),
    #"Changed Type1" = Table.TransformColumnTypes(#"Added Custom",{{"Response Rate", Percentage.Type}})
in
    #"Changed Type1"
 
Last edited:
Upvote 0
Not sure if I am understanding this correctly, but I suspect that you need to use the "Group By" feature, then create a custom column to calculate the response rate:

Power Query:
let
    Source = Excel.CurrentWorkbook(){[Name="SCFE_ResponseRate"]}[Content],
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"Year", Int64.Type}, {"STRM", type text}, {"Surveys Sent", Int64.Type}, {"Responses", Int64.Type}}),
    #"Grouped Rows" = Table.Group(#"Changed Type", {"Year", "STRM"}, {{"Surveys Sent", each List.Sum([Surveys Sent]), type nullable number}, {"Responses", each List.Sum([Responses]), type nullable number}}),
    #"Added Custom" = Table.AddColumn(#"Grouped Rows", "Response Rate", each [Responses]/[Surveys Sent]),
    #"Changed Type1" = Table.TransformColumnTypes(#"Added Custom",{{"Response Rate", Percentage.Type}})
in
    #"Changed Type1"
How do you add the Group By from the UI?
 
Upvote 0

Forum statistics

Threads
1,223,632
Messages
6,173,469
Members
452,516
Latest member
archcalx

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top