March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hi, I am trying to use CALCULATETABLE and SUMMARIZE on a table, using a SELECTEDVALUE as a filter :
Facing the same issue. Anyone able to find solution?
Am also facing same issue. Did you get solution for this issue?
Hi @JoaqBI
Do you refer to the same colum which is oin your slicer. Are you sure that if you select the slicer value that there is everytime only one unique Project_number behind it?
Can you please try to create a test measure
SELECTEDVALUE(Proj_CostSummaries[Project_Number])
then put this test emasure in a Card visual and place it on the same page. Does it show the project number expected?
Best regards
Michael
-----------------------------------------------------
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Appreciate your thumbs up!
@ me in replies or I'll lose your thread.
Hi Mike,
I tried and it doesn't work. I did a simpler Proj_CostSummaries table so I didn't need to share private data and attached the following 'Test' file.
You can see that if I change __SelectedValue for "00124" I could see the table properly filtered. However if I tried with either __SelectedValue or CurrentProject, it does not show anything.
Any ideas? Perhaps with the file (Super simple file) is easier to check.
Thanks a lot again!
Test File - Dropbox
HI @JoaqBI
Unfortunately due to security reasons I can not download files from public storage.
But in general the reason why SELECTEDVALUE does not work is when based on your selection there is not one unique value in the column fwhich you used in SELECTEDVALUE().
Can you please the sample data as a table in the post window?
Or another way. Can you please create a table and put in the table the column which you have used in SELECTEDVALUE. Then use the slider and show me the values which you can see in the table.
Best regards
Michael
Hi Mike,
Thanks a lot. I understand.
The Test file is this simple :
1.- I have a table with the columns Project_Number.
2.- I have a card showing CurrentProject.
CurrentProject = SELECTEDVALUE(Proj_CostSummaries[Project_Number])
Have you tried creating a relationship between the common columns in the two tables? I.e. workstage description? This seemed to resolve the issue for me.
If this worked for you please mark as a solution!
Can you please put this table on the page where you have set up everything?
If on your page this table shows more than one value then this is the reasong fpr your problem.
Best regards
Michael
Hi Mike,
The table does actually have the same project number more than once, screenshot below.
Do you think this is the issue ?
Is it possible to filter this table so I only see all the rows with Project_Number = SELECTEDVALUE.. for example, and I also see the workstage description column and the cost column/Sum of Cost ?
Thanks!
Hi @JoaqBI
same project number multiple times is not a problem. A problem only comes when you have different values in the current filter context because SELECTEDVALUE only gives back a value when there is one unique one in the current filter context.
BUT I looked on your initial request again and to be honest I was a little bit to quick with my initial suggestion. THe thing is you want to calculate a table and not a measure. and this is the problem.
So I have some other questions:
1) DO you want to calculate a table which is used inside of a measure or do you want to calculate a table which ist then stored in the data model?
2) what do you try to achieve with this? so what is the actual business problem. I understand you want to summarize a table but what is the reason for the second part?
Best regards
Michael
Best regards
Michael
-----------------------------------------------------
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Appreciate your thumbs up!
@ me in replies or I'll lose your thread.
Hi Mike,
Yes, the aim is to calculate a table filtering data from this other table.
The reason is to be able to display each workstage with their associated cost for a selected project. I am doing a simple project cost summary page.
The way the data is organised in Proj_Summaries is that you have a row with a project name, workstage, cost and period of time. So for each period of time on a stage you have a row. This is the reason why project number is repeated a few times within the table.
I am looking to filter that so I can show all the rows for one project only, the workstage and the sum of cost for that workstage.
If the filter is specific (i.e "00124" ) it works. If the filter is a selectedvalue it doesn't.
What confuses me is that when you display the selected value on a card it seems to be "00124" so I am not sure how to solve this.
Thank you once again.
Hi @JoaqBI
Please try to put SELECTEVALUE as separate variable
TableTesting2 =
VAR __SelectedValue = SELECTEDVALUE(Proj_CostSummaries[Project_Number])
RETURN
CALCULATETABLE(
SUMMARIZE(
Proj_CostSummaries,
Proj_CostSummaries[TS_Total_Cost_Project_Currency],
Proj_CostSummaries[Workstage_Description]
),
FILTER (Proj_CostSummaries, Proj_CostSummaries[Project_Number] = __SelectedValue)
)
Best regards
Michael
-----------------------------------------------------
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Appreciate your thumbs up!
@ me in replies or I'll lose your thread.
Hi Michael,
Thanks for your quick response. I have tried and it's still empty :
However if I tried to replace in the filter __SelectedValue with a fixed value for a project number, in this case "00440" it works :
I am having the exact issue as well. Any reoslution?
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
124 | |
89 | |
84 | |
70 | |
51 |
User | Count |
---|---|
206 | |
146 | |
97 | |
79 | |
69 |