Forum Discussion
Filter Table based on Slicer Selection
- 7 years ago
Anonymous add measure as below and in table visual, drop product and this new measure, you will have solution
Views Total = VAR __selectedValue = SELECTEDVALUE( Table2[MinViews] ) RETURN CALCULATE( SUM( Table3[Views] ), Table3[Views] >= __selectedValue )
parry2k wrote:Anonymousit will be much easier to provide an answer if you post sample data with expected output.
parry2k Thats a good Idea. So I have this table:
| MIN VIEWS |
| 100 |
150 |
200 |
250 |
and this table.
| Product ID | Views |
| 1 | 500 |
| 2 | 300 |
| 3 | 450 |
| 4 | 30 |
| 5 | 20 |
My expected Output is a new table, that dependant on some form of selection tool, gives me this output:
| Product ID | Views |
| 1 | 500 |
| 3 | 450 |
Thanks,
Leon
Anonymous add measure as below and in table visual, drop product and this new measure, you will have solution
Views Total = VAR __selectedValue = SELECTEDVALUE( Table2[MinViews] ) RETURN CALCULATE( SUM( Table3[Views] ), Table3[Views] >= __selectedValue )
- Anonymous7 years agoNot applicable
parry2k wrote:Anonymousadd measure as below and in table visual, drop product and this new measure, you will have solution
Views Total = VAR __selectedValue = SELECTEDVALUE( Table2[MinViews] ) RETURN CALCULATE( SUM( Table3[Views] ), Table3[Views] >= __selectedValue )
parry2k That works quite well, thank you. However when I add any other columns, new Products come into the table. Any chance I can prevent that? So then the output looks like this:
Product ID Views Total Price 1 500 50 2 60 3 450 10 4 22 5 12 I don't want 2,4,5 in the table though, because I'm working with and visualizing the numbers...
Thanks,
Leon
- lorenz02103 years agoHelper I
Hi All,
I am having the same issue and fairly new to dax. I am trying show the numbers based on the selected option in slicer and I am not getting any luck.
So far, here is the dax that I have but incomplete:
REGION Exp. Landing % vs 2023 Commit Filter =VAR _selectedValue = SELECTEDVALUE('2023 Attainment Details Back Up'[User TP Selling Role])RETURNCALCULATE(([ATT GRID OVERALL S + V]+[SUM of 80% SFDC Projection]+[REGION Weighted Pipeline]),'2023 Attainment Details Back Up','2023 Attainment Details Back Up'[User TP Selling Role]))