The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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!!
User | Count |
---|---|
11 | |
8 | |
6 | |
6 | |
6 |
User | Count |
---|---|
23 | |
14 | |
13 | |
10 | |
8 |