Forum Discussion
Eliminating "first/external" filter in tooltip page
Hi all,
See the attached sample pbix where we implement the following:
1. We want to implement translation of titles for differnet viuslas in a report. We have a table TitlesT that provides, for a title in English, its translation into different languages:
| Language |
EnglishTitle |
TranslatedTitle |
| en-US | TitleMain | TitleMain |
| fr-FR | TitleMain | TitleMain_FR |
| de-DE | TitleMain | TitleMain_DE |
| en-US | TitleTTip | TitleTTip |
| fr-FR | TitleTTip | TitleTTip_FR |
| de-DE | TitleTTip | TitleTTip_DE |
We have a simple measure for translating the title of visuals:
TitleMeasure =
SELECTEDVALUE(TitlesT[TranslatedTitle])
We set, through a filter visual, TitlesT[EnglishTitle] to the English title that we want for the visual and [TitleMeasure] will return the translated title. We use [TitleMeasure] as fx in the title of the visual.
The language is selected through a filter on all pages in the filters pane and the titles of the visuals will be translated accordingly.
2. The report has a Main page with a simple chart MainChart. We apply a visual filter to the chart with value TitlesT[EnglishTitle] = "TitleMain" to set the correct title to it.
3. We create a page tooltip called TTip. It has a simple chart (TTipChart). TTip is the tooltip for MainChart. We apply a visual filter to the TTipchart with value TitlesT[EnglishTitle] = "TitleTTip" to set the correct title
The expected behavior is that MainChart shows TitleMain (or any of its translations) as title and TTipChart shows TitleTTip (or any of its translations) as title. If you look at the pages in the attached pbix separately, that is what happens:
The problem is that when we hover above MainChart, the tooltip is shown without title:
This is because TitlesT[EnglishTitle] has both "TitleMain" and "TitleTTip" as values in the filter context (respectively set in the visual filters of MainChart and TTipChart). Thus the SELECTEDVALUE() in TitleMeasure returns blank and no title is shown in TTipChart.
Within the tooltip page, we want to eliminate TitleMain and keep only TitleTTip from the filter context so that the TTipChart shows the correct title.
How can we do that?
In essence, we want to keep the "closest" filter, applied to TitlesT[EnglishTitle] in the TTip page, and discard the "external" one coming from the Main page.
Thanks everyone
OwenAuger TomMartens MFelix AlexisOlson edhans jdbuchanan71
11 Replies
- AlexisOlson
Super User
Can you share a simple pbix that reproduces this setup?
- AlB
Community Champion
AlexisOlson
I edited the original post above to update the explanation and add a sample pbix
- parry2k
Super User
- AlB
Community Champion
Thanks parry2k
That is a last resort option but the actual report has many charts with situations like this so adding the filters that are needed manually after turning Keep all filters off wouldn't be practical.
Additionally, I'm particularly interested in whether that external filter can be somehow programmatically eliminated
- jdbuchanan71
Super User
I can't think of a way to remove the (outer?) filter context coming from the main page.
Not sure if this is a viable solution for you but, I made a copy of the TitlesT tables and used that in the TTip page and the measure for the TTip title and it seems to work.
Table
TitlesT2 = TitlesTTTip title measure
TitleTTMeasure = SELECTEDVALUE(TitlesT2[TranslatedTitle])I had to set the filter for language on all pages for both of the titles tables
I have attached my sample file.
- AlexisOlson
Super User
Use a separate measure for each title and remove the visual level filtering on EnglishTitle.
TitleMain = CALCULATE ( SELECTEDVALUE ( TitlesT[TranslatedTitle] ), TitlesT[EnglishTitle] = "TitleMain" ) TitleTTip = CALCULATE ( SELECTEDVALUE ( TitlesT[TranslatedTitle] ), TitlesT[EnglishTitle] = "TitleTTip" )Updated pbix attached.
- AlB
Community Champion
Thanks AlexisOlson
We need to use 1 (or a couple) generic measure for all visuals. If we customize the measure to each visual like in your example, we'd have 100s of measures in the report
- AlexisOlson
Super User
I'm only suggesting two measures, not one per visual.
If you augment your example to several more visuals, I can show you how to use these two generically.