I have asTimeline visual and below a Table. The idea is to display in the Table a Link to the specified record in another system. The problem is that I would like to show this Table only when there is exactly 1 record selected in asTimeline. Generally, the filtering works fine, but the table should be shown when there is only 1 element in it, and hidden otherwise.
Currently it is something like this:
Now, I have tried using the solution with a Transparent measure, similar to this. Tbe problem is that it doesn't work, the background of the table visual doesn't change when changing the selection (it is not a color problem, I have tried others). The question is whether the ISFILTERED is triggered at all when changing the selection?
Currently I have Make Transparent measure defined as
Make Transparent = IF(ISFILTERED(Table[Id]), "Red", "Blue")
and in asTimeline I have column Id specified as Entity.
I have a different idea about how to achieve that, It does not hide objects but uses a measure that returns values only when there is only one value selected.
Link = SELECTEDVALUE('Table'[link],BLANK())
or
Link = SELECTEDVALUE('Table'[link],"Please select only one Id")
A different formula might be
Link = IF(HASONEVALUE('Table'[Id]), SELECTEDVALUE('Table'[Link]), BLANK() )
Put one of those measures in a table, alone, and you should achieve what you need (also format the measure as "web URL").
Related
In the example below, the pop up displays all tags, not tags related to the highlighted card.
In the example above, the visualization comes out correct, however, it is mandatory to add a field from the Cartes_Etiquetas table in the visualization, so that it is displayed correctly filtered.
With the relationships being correct, how do I filter the data correctly, WITHOUT ADDING THE MIDDLE COLUMN IN THE VIEW?
Link to files on exemple...
https://drive.google.com/drive/folders/1eA8-DObEqnZNOInNehaO9UIlliO-SkPu?usp=sharing
Create a new measure as follows:
Measure = COUNTROWS('Cartões_Etiquetas')
Add the measure to the filter pane as follows:
Can someone please help me get a fix for this please.
I want to let people make only two selection at a time, no more no less from the given options. The intention is to get data on matrix dynamic column based on these two selections.
Thanks
Avi
You did not make clear what the purpose of this exercise is and how the result should look like ("get data on matrix dynamic column"), but you could
Create 2 single selection slicers based on copies of your category column
Make sure they are not related to the rest of your data model
Get the selected rows via the SELECTEDVALUE() function
You may have to consider the case where both selections are the same.
This would be a feature of a slicer visual, but I don't know of any built-in or custom slicer visual that does this.
As a workaround you can show a warning and instruction to select two items, eg a big Card visual with red text and a transparent background in front of your other visuals displaying a measure like:
AreTwoCategoriesSelected =
IF (
DISTINCTCOUNT ( DimProductCategory[ProductCategoryName] ) <> 2,
"Select 2 Categories for this report",
""
)
Which might look like
and
You can't easily use the trick where you have the measure conditionally return BLANK because most evaluations of the measure will have a filter context with just one of the selected values.
I've tried to be "clever" setting up a slicer for improved visual experience, but it is not working as expected.
The slicer is based on a manually created table with two options:
This leads to a slicer which is compact and intuitive for report users (multi-select allowed):
I can then create a couple of measures that record all possible truth states of the slicer, e.g.
HideInactivePathSelected = --Truth status of slicer selection
IF (NOT ISFILTERED(SlicerHideOption),FALSE, --If no slicer options selected
IF(SELECTEDVALUE(SlicerHideOption[Options]) = "Hide inactive/former pathologists",TRUE, --Specific option selected
IF(COUNTROWS(VALUES(SlicerHideOption)) = 2,TRUE, --If both slicer options selected
FALSE --If all else fails
) ) )
This can be confirmed using a simple table, which updates instantly and correctly when the slicer is changed e.g.:
The problem is, at this point, if I try to refer to the state of the measure HideInactivePathSelected, things no longer work.
For instance, if I create a calculated column that refers to the measure state, this does not work. Consider this simplified example:
test_value =
IF([HideInactivePathSelected] = True, 2, 0)
If I then make a test table or chart based off test_value, changing the slicer has absolutely no effect.
I suspect I have tried to be "too clever" and perhaps I have misunderstood the (non)dynamic nature of calculated columns. Can some kind soul tell me what I have done wrong? Is this approach salvagable or do I need to start again?
Using PowerBI RS Desktop May 2021 edition.
Measures in calculated column do not see the row context, so you have to do context transition using Calculate function, e.g.:
test_value =
IF( CALCULATE( [HideInactivePathSelected] ) = True, 2, 0)
It should be easier to solve your issue if you provide some example data. There are better and more efficient ways to achieve the goal of filtering data in whole page, than using the measure and then calculated column.
Hello I am trying to raise awareness about his subject I am facing this issue, I've posted on microsoft PBI community as wel, Did you even know about this, if so, how did you do to workaround this?
https://community.powerbi.com/t5/Desktop/Beware-Misleading-behaviour-using-Select-all-or-none-selected/m-p/1982650#M749494
As stated in the post, I have just found half a paragraph hinting about this behaviour and all the people that I've talked to did not even know it behaved this way.
TL:DR. If you use the filter panel to filer a slicer (filter on this visual) in order to restrict the selection of a slicer (so your end user does not get lost in too many options or you want a dynamic slicer showing last x months, TOP N , basically any other advanced filtering optins given using this feature).
It only visually filters the slicer so if the user ends up using "select all" or even clearing the selection, all the data would be selected even the data you (as designer) wanted to filter out. Which is misleading since the end user would see the tag "all" over the slicer selection but when clicking on it it would only show the filtered out values, so they would naturally assume that "all" means just those values and not allvalues (hidden values included).
Example
there are only two values to be selected in the slicer but the select all option actally seelcts all values including hidden ones
One thing to check first, I bet you did not apply the filtered values in the filter pane on the whole page, rather you applied it only on the visual. Try to apply that on the whole page and it seems to work for me.
I have a few visuals on my report that I only want to display when just one value is selected in the sliced column. I attempted to do this by creating a measure to evaluate the number of selections in the sliced column, and then used this measure as a filter in my visual. The measures I've attempted are the following:
SlicerCheck = if(calculate(distinctcount([SlicerColumn]),allselected([SlicerColumn]))=1,"Y","N")
//I set the visual filter to "is Y" in this case
And
SlicerCheck = If(HASONEVALUE('Master File'[Custom]),1)
//I set the visual filter to "is 1"
However, as seen in the attached image (based on the second measure above) Slicer Error, the visual on the top right hand side still has a display even though the SlicerCheck is blank. This is also an issue when all the values are selected in the slicer, before a filter selection is made.
Please let me know if there is a solution to this, or if I'm making a mistake.
I was able to achieve the desired outcome by using the HASONEFILTER function instead of HASONEVALUE.