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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Anjali66
New Member

creating a bar and pie chart in power BI desktop

Hi All, I am very new to power BI. I have the follwoing data in my table StartDate endDate FirtsName LastName Section ProjectName TotalHours 12-06-2018 12-19-2018 M1 ML1 Developer Project1 14 11-22-2018 12-5-2018 M2 ML2 QA QAProject 20 12-06-2018 12-19-2018 M1 ML1 Developer Project3 10 I want to show a bar chart and pie chart in my power bi desktop that shows the hours spend by each developer on each project. Also, is it possible for the user to filter the chart based on startDate, endDate and/or project Name I am connectimng to the sql server and passing the below quesry to power BI desktop get the above data: select pp.StartDate, pp.EndDate ,rs.FirstName, rs.LastName, rs.Section ,pd.Name ,tsd.Hours1+ tsd.Hours2 + tsd.Hours3 + tsd.Hours4 + tsd.Hours4 + tsd.Hours5 + tsd.Hours6 + tsd.Hours7 + tsd.Hours8,tsd.Hours9 + tsd.Hours10 + tsd.Hours11 + tsd.Hours12 + tsd.Hours13 + tsd.Hours14 as TotalHours from [dbo].[TimeSheet] ts Inner join [dbo].[TimeSheetHours] tsd on ts.Id= tsd.TimeSheetId inner join [dbo].[PayPeriod] pp ON ts.PayPeriodId = pp.Id inner join [dbo].[Resource] rs ON ts.ResourceId = rs.Id inner join [dbo].[ProjectDetail] pd ON tsd.ProjectId = pd.Id order by pp.StartDate desc
1 ACCEPTED SOLUTION
v-shex-msft
Community Support
Community Support

Hi @Anjali66,

 

You can refer to following gif to know how to create bar and pie chart which you wanted.

61.gif

 

In addition, current power bi is impossible to push date view slicer/filters to query table to effect source data. You can consider to add query parameter as filter to dynamic change data source.

Deep Dive into Query Parameters and Power BI Templates

How do I pass parameters to my SQL statement?

 

Regards,

Xiaoxin Sheng

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

View solution in original post

1 REPLY 1
v-shex-msft
Community Support
Community Support

Hi @Anjali66,

 

You can refer to following gif to know how to create bar and pie chart which you wanted.

61.gif

 

In addition, current power bi is impossible to push date view slicer/filters to query table to effect source data. You can consider to add query parameter as filter to dynamic change data source.

Deep Dive into Query Parameters and Power BI Templates

How do I pass parameters to my SQL statement?

 

Regards,

Xiaoxin Sheng

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

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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