Sparkline not showing values formatted in £ and or %

I hope someone can assist me, i am following the course in EnterprsieDNA and i am trying to creae a paginated report. the datasource is from my powerbi dataset in power bi service. This is first time i am using powerbi report builder. The matrix populate correct data based on KPI list in the matrix table. However the sparkline does not seem to recognise some formats (£ and %) see the photos. I have created a calculated field in my dataset name Matrix_Scorecard_Practice_Actual_Combined with this expression =IIF(
Right(Fields!Matrix_Scorecard_Practice_Actual.Value, 1) = “%”,
CDbl(Replace(Fields!Matrix_Scorecard_Practice_Actual.Value, “%”, “”)) / 100,
IIF(
Left(Fields!Matrix_Scorecard_Practice_Actual.Value, 1) = “£”,
CDbl(Replace(Fields!Matrix_Scorecard_Practice_Actual.Value, “£”, “”)),
IIF(
IsNumeric(Fields!Matrix_Scorecard_Practice_Actual.Value),
CDbl(Fields!Matrix_Scorecard_Practice_Actual.Value),
Nothing
)
)
)

I have added a column in my matrix to insert the sparkline, right click on the chart data value +icon to bind the calculated field =Sum(Fields!Matrix_Scorecard_Practice_Actual_Combined.Value), i have added under category group Financial quarter field. when running the report the sparkline only shows value format as whole or decimal number but not £value and or %value. I have tried everything and spend 3 days trying to find a solution. can anyone suggest an alternative and or if i am missing adding the format somewhere else


In advance thank you for your support

Hi @zohra.belabed ,

While waiting for the community to review and respond to your issue, take advantage of Data Mentor . It offers a wealth of tools and resources that could provide immediate solutions and enhance your report-building efficiency.

Cheers,

Enterprise DNA Support Team

Hi @zohra.belabed,

I see that your IIF is referencing the FieldName.Value attribute. That attribute is literally the data value returned from the data source. If you are surfacing just the number and then applying the “£” or “%” in the report (via expression or the Format property), the character you are looking for is not actually in the FieldName.Value attribute.

You might try FieldName.Label in your IIFs. I use that all the time for getting the selected report parameter label when I have a dropdown list with a code/ID value and a text display name.

If that does not work, you will need to find a way to apply the same logic that determines “£” or “%” for the Matrix_Scorecard_Practice_Actual field within the sparkline expression.

John

I have discovered data mentor brilliant platform

Hi Jpratt
sorry about the delay did not received a notification for any follow up. I will try your suggestion and come back to you with an outcome

1 Like