Forum Discussion
Parameter controlled visual and filtering the tooltip
I have a simple stacked column chart
that changes based on a parameter:
I have a tooltip, but it filters down to just the quarter when viewed by Quarter:
By Year it does show all four quarters, but it still is only showing based on the section of bar hovered over (legend field).
What I want the tooltip
to always show is
I've probably read over 50 webpages, blog posts, forum posts, reddits, etc., and have probably tried as many things. I cannot get what I'm looking for.
I apologize for no sample attachment. Company Privacy. I'm using a factless fact table. I have no facts in what I'm reporting on -- just counting items based on a couple of dimensions.
Calculated Column:
Count CERs = calculate (count (<unique ID>, not ([STATUS] in {"R","W"})
25 Replies
- AnonymousNot applicable
"Context" is whats important when solving Power BI Dax challenges. If we break the problem down into the idea of what conext do you find yourself in and what context do you want to show. If you can articulate that, the solution should be much easier to build.
When you are hovering over a visual, the context your find yourself in is that Year/Quarter as well as the metadata you are using to create your groupings, which from your screenshots are numbers like 11, 146, 48.
So if you run a measure that does something like
Gross Revenue = SUM('Sales'[Value])your outcome is going to be in that context. My example of course it not yours, just keeping it simple.
If you want to ignore some of the context, this is where you'll need a new measure that ignores specific parts of the context. For example:
CALCULATE( [Gross Revenue], FILTER( ALLSELECTED('Calendar'[Month]) ) )This will run the gross profit measure but ignore the table's filtering of the "Month" column from your table without ignoring the filtering of other data table columns, like financial year. The ALLSELECTED still obeys your page's overarching filtering, so you aren't going to get literally everything.
Bringing this back to your example and what I was talking about of Context. What metadata columns are being filtered when your tooltip appears that you would like to expand? Can you write a new measure to put into your tooltip table that lets you use something like ALLSELECTED to expand the context outward to where you want?
- pankajnamekar25Super User
Hello jjustjjo
try with this measure
Count CERs Tooltip =
CALCULATE(
COUNT(<unique ID>),
NOT('Table'[STATUS] IN {"R","W"}),
REMOVEFILTERS('Table'[Active-Completed]),
REMOVEFILTERS('Table'[CER Status])
) - jjustjjoHelper II
pankajnamekar25 , Anonymous Thank you both for your replies. I tried these and they do not resolve the problem. I suspect the issue resides in the fact that that the chart changes based on the parameter View By. Because of this the context changes depending on which view of the chart is shown. I will try to mock up an example to post.
- jjustjjoHelper II
Anonymous pankajnamekar25 I'm not a power/super user, so I can't post files (that's helpful, not). Waste of my time to create an example of the exact scenario and I can't post it. I probably can't share my company one drive account so that's out too. I guess it will just go unsolved.
- v-ssriganeshCommunity Support
Hi jjustjjo,
Thank you for posting your query in the Microsoft Fabric Community Forum.
I was able to reproduce your scenario in Power BI Desktop, including the field parameter (View By), stacked column chart, and tooltip behavior.After testing, I was able to achieve the expected output based on your requirement:
- The tooltip respects the Year/Quarter context
- It ignores the legend (Active/Completed) filter
- It always shows the full breakdown (both Active and Completed) regardless of which segment is hovered
The solution involves:
- Creating a base measure for correct calculation
- Using REMOVEFILTERS() to eliminate legend context in tooltip scenarios
- Separating tooltip logic from split measures (Active / Completed)
This ensures the tooltip behaves consistently even when switching between Year and Quarter using the parameter and For your reference, I’ve attached a sample .pbix file that demonstrates this setup and behavior. You can use it to compare with your model and adapt accordingly.
Best regards,
Ganesh Singamshetty- jjustjjoHelper II
Thank you for this v-ssriganesh Unfortunately, the requirements you followed are not quite correct. It should be
- The tooltip respects the Year, but ignores the Quarter context when present
- It always shows the full breakdown of Completed and Active Statuses regardless of which segment is hovered
The tooltip should look like this:
That change was easy enough to accomplish. So, while it does at least give me the full breakdown, I still have the issue where hovering over a segment in the Quarter view produces
instead of
- v-ssriganeshCommunity Support
Hello jjustjjo,
Thank you for your clarification.
I used a disconnected Quarter table along with TREATAS():- Created a separate table:
Quarter Table = DISTINCT(CER_Data[Quarter])- Used this table in the tooltip matrix (Rows)
- Updated measures:
Active Count = CALCULATE( [Count CERs Base], CER_Data[Active-Completed] = "Active", REMOVEFILTERS(CER_Data[Quarter]), TREATAS( VALUES('Quarter Table'[Quarter]), CER_Data[Quarter] ) )Completed Count = CALCULATE( [Count CERs Base], CER_Data[Active-Completed] = "Completed", REMOVEFILTERS(CER_Data[Quarter]), TREATAS( VALUES('Quarter Table'[Quarter]), CER_Data[Quarter] ) )The disconnected table prevents the hover from filtering Quarter and TREATAS() reapplies the correct row-level context. This allows showing full breakdown while ignoring the hovered segment.
For your reference, I have attached a sample .pbix file demonstrating this setup and behavior.
Best regards,
Ganesh Singamshetty
- v-ssriganeshCommunity Support
Hello jjustjjo,
Hope everything’s going great with you. Just checking, the issue been resolved or are you still running into problems? Sharing an update can really help others facing the same thing.
Thank you.
- jjustjjoHelper II
Have been dealing with the usual monday-am mini-fires at work. This is next on my list and will report back once I have some results. thank you for checking!!
- jjustjjoHelper II
Hi v-ssriganesh
I'm able to duplicate your results in your simplified version with the added complexity of making the tooltip look like this:However, when I apply these changes to my full more complicated version, I still get this when hoving over a completed section of the bar:
and this when hovering over the Active section of the bar:
Note that your View by differs from mine (yours on the bottom in this image):
This because multiple years can be displayed. I can't use just quarter. I have an added column for sorting Active-Completed; I also am sorting View-by by it's sort column. So, for example, my definition for In Progress on the Tooltip looks like this:
All my TT formulas remove those four filters and include the treatas statement. The counts are correct, but I can't all four quarters to show in the quarter view. Even going to a simplified tooltip that only contains
I still only get the hovered quarter showing.
In addition, I am completely gobsmacked by the following (although not as important as the original request). I took a copy of your earlier version that I had modified and modified it to match your newer one. I have painstakingly reviewed all formulas, table defs, etc., to confirm that are identical. This is my result:Note that the top version is the earlier version you sent that I modified ( I just used a slightly different table name for the quarter table. I used your exact definition. Not the completed counts on the earlier version are different.
There are a few other mods I've made, but they are in both versions identically:
- jjustjjoHelper II
v-ssriganesh
I just unearthed one thing. In the above images, the Not Linked counts always shows. This is apparently because the the formula references 3 others: Active CERs, Total Completed Count, Count In Progress, Count Pending. These formulas either or both [Active-Completed] and [Completion Timing] in their formulas. I'll mess around with those and post an update if I figure anything out.
- v-ssriganeshCommunity Support
Hello jjustjjo,
Could you please confirm whether your query has been resolved or if the shared suggestions helped address the issue? Your confirmation would be helpful for other community members who may encounter a similar scenario in the future.
Thank you for being part of the Microsoft Fabric Community.
Best regards,
Ganesh Singamshetty- jjustjjoHelper II
v-ssriganesh At the moment, I do not consider it resolved. If I get it working and anything in this thread was contributory, I will post the exact resolution and close the thread.