xViz
ProductPricingCommunity
  • Welcome to xViz Docs!
  • Project Management
    • Project Management - xViz Gantt Chart | Introduction
    • Hierarchy and Additional Columns
    • 🔸Milestones
      • Milestone Formatting
    • Planned Bars
      • Planned Bars Formatting
    • Connectors
      • Primary & Secondary Connectors
      • Multiple Connectors
      • Connectors Formatting
    • Progress
      • Tracking the progress
      • Progress Bar Display
      • Progress Base
      • Bar Formatting
    • Timeline Configurations
      • Timeline Start/End
      • Timeline Range
      • Header Levels
      • Zoom Levels
      • Zoom Options
      • Fiscal Year Support
      • Timeline Format
      • Language Support for Timeline
    • ✨Alerting Techniques
      • Steps to enable Conditional Formatting
      • Conditional Formatting
    • Reference Lines and Reference Range
      • Introduction
      • Static Approach
      • Data Driven Approach
    • Resource Gantt
    • ➡️Other Features
      • Data Colors
        • Row Background Color
        • Bar Border Color
        • Bar Selection Color
        • Bar Fill Color
        • Connectors
      • Duration Data field
      • Display Duration
      • Display Totals
      • Hide Blanks
      • Date Formats
      • DaysOff
        • Weekday
        • Custom Date
      • Setting Up Drill-through
      • Configure External URLs
      • Splitter Position
      • Text Customization
      • Row Numbering
      • Indentation
      • Sorting
    • Parent Level Calculations
      • Aggregation Types
    • Tooltip
    • Release Notes
    • ❓FAQs
  • Performance Management
    • Performance Flow - Introduction
      • Installing from AppSource
      • Get Started
    • Use Cases
      • Organization Performance
      • Microsoft Tenant Data Analytics
        • Organization Chart using Microsoft Graph API
      • Process Flow
      • Sales Performance Analysis
      • Cost Center Analysis
      • KPI Tree
      • Warehouse Management
      • Supply Chain Network
    • Configuring the chart structure
      • Hierarchy structure
      • Grouping / Swim Lanes
        • Data Structure for Columnar Group View
        • Data Structure for Wide Group Views
      • Invisible Group
    • 🪪Display Data in the Cards
      • Title, Subtitle
      • 👨‍💼Images
        • Converting HTTPs link images/icons to Base 64 in Power BI
        • Handling long Base 64 URLs in Power BI
      • 🔢Displaying KPIs
        • Number Formatting
      • 🔻Displaying Variance
      • Sparkline Trends
      • 🔗Hyperlinks
    • Card Formatting
      • Data-Driven Color
      • Templates
      • Customize Template
        • Insert additional data
        • Alignment
        • Wrap Text
        • Styling
        • Margin & Split
        • Modify (Delete / Cope-Paste)
        • Import/Export
    • Links
    • 🗒️Notes & Annotation
    • 🚦Conditional Formatting
    • Layout & Orientation
    • ✨Search
    • ✨Viewing Subtrees
      • Cross Filtering with Subtrees
    • 🔐✨User Context - RLS Experience
    • ✨Filter Context
    • 🎨Formatting Features
      • Formatting Font & Colors
      • Connectors
      • Expand Collapse Button
      • Dimensions
    • Toolbar Ribbon Configuration
    • Simulation
    • ❓FAQs
      • Circular Dependency message
    • Tips & Tricks
      • Bookmark
      • Report Page Tooltip
      • Field Parameters
      • Drill Through
    • Release Notes
Powered by GitBook
On this page
  • Check the length of characters of the Base64 URL in Transform Editor/Power Query
  • Steps to handle long Base 64 URLs to display the full images
  • Step 1: Data Type of the Base 64 URL column
  • Step 2: Transformation steps in Advanced Editor
  • Step 3: Creating a DAX measure to group the Base64 URL to display the images

Was this helpful?

  1. Performance Management
  2. Display Data in the Cards
  3. Images

Handling long Base 64 URLs in Power BI

PreviousConverting HTTPs link images/icons to Base 64 in Power BINextDisplaying KPIs

Last updated 11 months ago

Was this helpful?

If the images are displaying partially in Power BI with the Base 64 URLs, then the reason is the character limit in Power BI. The maximum length of a text value that the Power Query engine can load into a single cell in a table in a dataset is 32,766 characters – any more than that and the text will be silently truncated.

Check the length of characters of the Base64 URL in Transform Editor/Power Query

To understand what the length of the Base 64 URLs for your images is, please follow the below steps:

  1. Select the Base 64 column of the image

  2. Add column → Extract → Length

  1. You will now be able to see the length of the Characters of all the Base64 URLs

Steps to handle long Base 64 URLs to display the full images

Step 1: Data Type of the Base 64 URL column

Ensure that the data type of the Base 64 URL column must be "Text"

Step 2: Transformation steps in Advanced Editor

Open the Advanced Editor of the same query for the next set of steps:

  1. Click on Advanced Editor

  1. Copy and paste the below code in the existing steps:

   // Creates Splitter function
   #"SplitTextFunction" = Splitter.SplitTextByRepeatedLengths(30000),
   // Converts table to list
   #"Input List" = Table.ToRows(LastStepName),
   //Function to convert binary images to multiple text values
   #"Convert 1 File" = (InputRow as list) =>
     let
        BinaryIn = InputRow{1},
        FileName = InputRow{0},
        BinaryText = Binary.ToText(BinaryIn, BinaryEncoding.Base64),
        SplitUpText = SplitTextFunction(InputRow{1}),
        AddFileName = List.Transform(SplitUpText, each {FileName,_})
     in
        AddFileName,
   // Loops over all images and calls the above function
   #"Convert All File" = List.Transform(#"Input List", each #"Convert 1 File"(_)),
   // Combines lists together
   #"Combine the Lists" = List.Combine(#"Convert All File"),
   // Converts results to table
   #"Convert to Table" = #table(type table[Name=text,Base64 Img=text],#"Combine the Lists"),
   // Adds index column to output table 
   #"Added Index" = Table.AddIndexColumn(#"Convert to Table", "Index", 1, 1, Int64.Type)
in
    #"Added Index"

Note: Ensure to replace LastStepName with the name of the last step that you see in the Advanced Editor before pasting this code

The final query should look something like as shown below:

Step 3: Creating a DAX measure to group the Base64 URL to display the images

  1. Create the below DAX measure to display the images

Display Image = 
   CONCATENATEX(
        'Base64', 
        Base64[Base64 Img],
        , 
        Base64[Index],
        ASC)
  1. Add the DAX measure in the Performance Flow visual and display the images

🪪
👨‍💼
Image 1: Images displaying partially in Power BI
Image 2: Extracting the length of every value for a column in Power Query
Image 3: Length of Base 64 URLs in Power Query
Image 4: Data type as Text
Image 5: Advanced Editor option in Power Query
Image 6: Final query look
Image 7:High-resolution Images in xViz Performance Flow visual