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.
Hey PowerBees
I'm working on a BSC-solution and I want to add a sparkline. The solution uses direct query from many separate datamodels, which in turn pull data from our GxP server. The BSC shows >100 KPIs from different areas of the business. They are listed in Time Intelligence columns, to show Last Closed Month, Year to Closed Month, Last 12 Closed Months and a sparkline for the Last 12 Closed Months.
The KPIs are calculated by separate measures and combined with a single switch measure, like so:
_ExampleSelector =
VAR vSelectedMeasure = SELECTEDVALUE('KPIlist'[KPI],"NONE")
VAR vMeasureToDisplay = SWITCH( vSelectedMeasure
,"ExampleKPI1", [ExampleMeasure1]
//,"ExampleKPI2", [ExampleMeasure2]
//,"ExampleKPI3", [ExampleMeasure3]
,BLANK())
RETURN vMeasureToDisplay
Using the above I get no sparkline graph and the hover says "undefined".
If I use the individual measures the sparkline works fine, so I believe the problem is isolated to the measure linked above.
Do you have any tips I can try to fix this?
@Anonymous , Can define a default measure when nothing is selected
_ExampleSelector =
VAR vSelectedMeasure = SELECTEDVALUE('KPIlist'[KPI],"ExampleKPI1")
VAR vMeasureToDisplay = SWITCH( vSelectedMeasure
,"ExampleKPI1", [ExampleMeasure1]
//,"ExampleKPI2", [ExampleMeasure2]
//,"ExampleKPI3", [ExampleMeasure3]
,[ExampleMeasure1])
RETURN vMeasureToDisplay
Thanks, This worked for me in a similar scenario!!
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the September 2025 Power BI update to learn about new features.
User | Count |
---|---|
9 | |
8 | |
8 | |
4 | |
3 |
User | Count |
---|---|
15 | |
15 | |
11 | |
10 | |
10 |