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.
how to implement this query in power bi
select epu.[Project Status] INTO #temp from pjrep.MSP_EpmProject_UserView epu (nolock) where
([Project Departments] = @ProjectDepartmentName or @ProjectDepartmentName = '-1') and
([Concept Type] = @ConceptType or @ConceptType = '-1') and
([Primary Technology Department] = @PrimaryTechnologyDepartment or @PrimaryTechnologyDepartment = '-1') and
([Business Sponsor] like '%' + @CommercialProductOwner + '%' or @CommercialProductOwner = '-1')
select
(select count(*) from #temp where [Project Status] = 'On Schedule' ) as Green,
(select count(*) from #temp where [Project Status] = 'Not Started' or [Project Status] = 'Possible Delayed' ) as Yellow,
(select count(*) from #temp where [Project Status] = 'Delayed' or [Project Status] = 'Suspended' ) as Red
Solved! Go to Solution.
The proper answer is below :
Use CALCULATE function and get (Project Status) data in PIE chart.
Get all parameters into three drop downlists.
then drag and drop Project Status on PIE Chart.
Hi @basim,
Could you please mark the proper answers as solutions?
Best Regards,
Dale
The proper answer is below :
Use CALCULATE function and get (Project Status) data in PIE chart.
Get all parameters into three drop downlists.
then drag and drop Project Status on PIE Chart.
Thank you so much for sharing with us. @basim,
Best Regards,
Dale
Hi @basim,
Seems you want a DAX formula. It could be like below. But the details are based on your data. If you need it, please provide a sample data.
#temp = filter( selectcolumns(msp_epmproject_userview, "Project Status", [project status]), ([project departments] = @ProjectDepartmentName OR @ProjectDepartmentName = '-1' ) && ( [concept type] = @ConceptType OR @ConceptType = '-1' ) && ( [primary technology department] = @PrimaryTechnologyDepartment OR @PrimaryTechnologyDepartment = '-1' ) && ( [business sponsor] LIKE '%' + @CommercialProductOwner + '%' OR @CommercialProductOwner = '-1' )
Best Regards,
Dale
Hi @basim,
You can use this SQL query directly in Power BI.
Go To >
Get Data > Sql Server > Advance options > Put your Sql Query.
Make sure you have last statement as select * from #temp , so that you query should return something.
Thanks,
Jayant
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
111 | |
94 | |
83 | |
66 | |
59 |
User | Count |
---|---|
151 | |
121 | |
104 | |
87 | |
67 |