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.
Hello all,
I have a table with cities and I want to obtain the same table without the value selected on a single-selection slicer.
What I have - What I want
I have tried it by creating a measure that catches this value and then filtering the first table. But SELECTEDVALUE(ciudad[ciudad]), that is what I'm using to catch this value, returns always blank.
I will appreciate any new idea about how I can reach this out or any tip about how SELECTEDVALUE works.
Solved! Go to Solution.
No my mistake sorry.
This code works at my place
Hi @Clax ,
Thanks to @Nithinr for the solution.
Here's another one of my solutions.
Here some steps that I want to share, you can check them if they suitable for your requirement.
Here is my test data:
Create a calculated table
Table 2 = VALUES('Table'[Country])
Create a measure
Measure =
CALCULATE(
COUNTX('Table','Table'[Country]),
FILTER(
'Table',
'Table'[Country] <> SELECTEDVALUE('Table 2'[Country])
)
)
Apply the measure to the filter on this visual to the table view and set the value as "is 1"
Drag the table 2 into the slicer
Final output
Best regards,
Albert He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi @Clax ,
Thanks to @Nithinr for the solution.
Here's another one of my solutions.
Here some steps that I want to share, you can check them if they suitable for your requirement.
Here is my test data:
Create a calculated table
Table 2 = VALUES('Table'[Country])
Create a measure
Measure =
CALCULATE(
COUNTX('Table','Table'[Country]),
FILTER(
'Table',
'Table'[Country] <> SELECTEDVALUE('Table 2'[Country])
)
)
Apply the measure to the filter on this visual to the table view and set the value as "is 1"
Drag the table 2 into the slicer
Final output
Best regards,
Albert He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi @Clax , Please find the below solution that worked for me
Create a Calulated table which contains values of the slicer
Slicertable= DISTINCT(ciudad[ciudades])
Create a relationship between Slicertable and Cities table
Create Below Measure
Filtered Table = IF ( CALCULATE(COUNT(original[Inventory Number]),
original[Inventory Number] = SELECTEDVALUE('original'[Inventory Number])) >0,1,0)
Note : Create a slicer using Slicer table
Last step make sure filter section select the measure Value as 0 this excludes the selected value in table, please find the screenshot below.
Hello JamesFR06,
If it is possible to have a dynamic table, that is better. I just was trying with a new table in case it would be easier to succeed.
Ok
So we are going to use selectedvalue on a measure for this
Measure=
Var Selectcity=selectedvalue('Table[Ciudades])
var Filteredciudades=filter('Table,'Table[Ciudades]<>Selectcity)
Now you dynamic table is ok and for exemple you can count number of rows
return
Countrows(Filteredciudades)
I've tried that, but I still have the same problem. If I create a visualization for the measure, it is blank. I might be doing something wrong.
No my mistake sorry.
This code works at my place
Hello Clax,
You want to create a new table or you want a dynamic table ?
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 |
---|---|
105 | |
96 | |
79 | |
67 | |
62 |
User | Count |
---|---|
137 | |
106 | |
104 | |
81 | |
63 |