Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Hi All,
I am learning PowerBI and I am trying to create a table taking 3 columns from another table filtering the project number ( Information of another table) based on a selected value.
CurrentProj = SELECTEDVALUE(Proj_CostSummaries[Project_Number])
The Code to create the table is the following :
It looks like the issue is that you are trying to use the selected value of Project_Number as a filter, but you are referencing it using the wrong syntax. In the FILTER function, you should reference CurrentProj directly instead of using the square brackets ([]) around it.
Try changing your code to the following:
TimeSpent = CALCULATETABLE(SUMMARIZE(Proj_CostSummaries,Proj_CostSummaries[Period_Date],Proj_CostSummaries[TS_Total_Cost_Project_Currency],Proj_CostSummaries[Project_Number]), FILTER(Proj_CostSummaries,Proj_CostSummaries[Project_Number] = CurrentProj))
Thanks for your quick response, CurrentProj is defined like this :
CurrentProj = SELECTEDVALUE(Proj_CostSummaries[Project_Number])
If I try to change the FILTER with "00688" which is a possible value for Project Number it works 🙄
create a measure that counts the rows that match the selected project number, and use that measure as a filter in your code.
CurrentProj = COUNTX(FILTER(Proj_CostSummaries,Proj_CostSummaries[Project_Number] = SELECTEDVALUE(Proj_CostSummaries[Project_Number])))
and then use that measure in your filter.
TimeSpent = CALCULATETABLE(SUMMARIZE(Proj_CostSummaries,Proj_CostSummaries[Period_Date],Proj_CostSummaries[TS_Total_Cost_Project_Currency],Proj_CostSummaries[Project_Number]), FILTER(Proj_CostSummaries,CurrentProj >0))
Thanks @jaweher899 but it seems it does not allow me to use CurrentProj without [].
I have also tried the code you suggested and had the following problems :
User | Count |
---|---|
11 | |
9 | |
6 | |
5 | |
4 |