Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric Ideas just got better! New features, better search, and direct team engagement. Learn more

Creating Dynamic KPI Card Titles and Retrieving Visual Dimensions in BI Dashboards

DAXian_1-1745072115529.png

 

Background: I created a KPI Card displaying data up to the quarter level in the date hierarchy. A label correctly reflects the applied filter/expansion level (e.g., "Current Quarter") at the tooltip. However, when using this label in conditional formatting for the title, it returns "Current Period" instead of "Current Quarter," indicating it defaults to the unfiltered state.

Issue: The title does not inherit the expected "Current Quarter" value from the line chart visual's filter context, making dynamic title updates challenging.

Desired Improvement: I want the title to dynamically reflect the filter level (e.g., "Current Quarter") based on the visual's date hierarchy, similar to the tooltip behavior. This would streamline the creation of dynamic visuals.

Additional Request: I seek a function to retrieve a visual's width and height to optimize text title calculations.

Current formula for title :

Label =
SWITCH(
    TRUE(),
    ISFILTERED('Calendar'[Week Ending]), "Week Ending",
    ISFILTERED('Calendar'[Day]), "Day",
    ISFILTERED('Calendar'[Month]), "Current Month",
    ISFILTERED('Calendar'[Quarter]), "Current Quarter",
    ISFILTERED('Calendar'[Year]), "Current Year",
    "Current Period"
)

 

Status: New