Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
Solved! Go to Solution.
[ToolTip Tile] =
SWITCH ( TRUE (),
HASONEFILTER ( Dataset[Category] ),
SELECTEDVALUE (
Dataset[Cateogry],
"Select Category"
),
HASONEFILTER ( Dataset[Location] ),
SELECTEDVALUE (
Dataset[Location],
"Select Location"
),
"No record available"
)
If you want to save time, then you want to carry out calculation inside SWITCH, not outside. SWITCH will often (not always) perform only the needed calculations whereas if you take out the formulas and put them in variables outside SWITCH, all of them will get calculated (unnecessarily most of the time).
Best
D
[ToolTip Tile] =
SWITCH ( TRUE (),
HASONEFILTER ( Dataset[Category] ),
SELECTEDVALUE (
Dataset[Cateogry],
"Select Category"
),
HASONEFILTER ( Dataset[Location] ),
SELECTEDVALUE (
Dataset[Location],
"Select Location"
),
"No record available"
)
If you want to save time, then you want to carry out calculation inside SWITCH, not outside. SWITCH will often (not always) perform only the needed calculations whereas if you take out the formulas and put them in variables outside SWITCH, all of them will get calculated (unnecessarily most of the time).
Best
D
You can remove that IF condition from HASONEFILTER because it already returns TRUE if the column has one filter else it returns FALSE. You can try this construct, let me know if it doesn't work for you.
ToolTip_Tile =
VAR SelectedMainCategory =
HASONEFILTER ( Dataset[ Cateogry] )
VAR SelectedLocation =
HASONEFILTER ( Dataset[Location] )
VAR MainCategory =
SELECTEDVALUE ( Dataset[ Cateogry], "Select Category" )
VAR Location =
SELECTEDVALUE ( Dataset[Location], "Select Location" )
RETURN
SWITCH (
TRUE (),
SelectedMainCategory, MainCategory,
SelectedLocation, Location,
"No record available"
)
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.
User | Count |
---|---|
12 | |
11 | |
10 | |
9 | |
8 |