Visual calculation user defined functions (with SVG support)
Imagine there is a place (like I did using the calculation groups), where you can create a DAX based user defined function that generates a certain type of SVG visualization.
Now you can add visual level calculation like SVG_Variance = UDF_SVG_VARINCE([Sales],[Previous Sales],[Total Sales]) and get #IBCS-styled SVG as the output.
Or any other SVG. Easy to reuse in any table/matrix visual, just call the function. Easy to customize, just edit the function definition. Incredible performance (it's a visual calculation, the dataset size doesn't matter anymore).
7 Comments
- joao_a_campanicNew Member
Great 👍 full support on that
- a_3New Member
A bit more details about the idea.
Now, to a visualization in a matrix visual and to avoid code duplication in every visual in a report I use a calculation group to generate SVG images. To configure the solution I have to edit multiple calculation group items to define what fields and measures will be used in different visuals (based on a measure name).
The idea is to be able define a custom visual calculations function (something like a measure with parameters) instead.
Then you will write a visual calculation:
New Column = UDF_SVG_ABSOLUTE_VALUES ([Sales], PREVIOUS ([Sales])
[Sales] and previous year [Sales] parameters will be passed into the function to generate SVG code of the chart with of two columns: black for [Sales] and grey for previous year [Sales].
So the result of UDF_SVG_ABSOLUTE_VALUES ([Sales], PREVIOUS ([Sales]) function is what you see in column AC,PY on the image. Similar approach (just different user defined functions with different parameters to generate 2 other columns with charts).
The code of the user defined function will be simple: it's just about converting input parameters (sales in the example) into the SVG rectangles.
Also you'll be able to make custom functions that generate any SVGs you want.
- a_3New Member
VIDEO Imagine you can do this: https://www.dropbox.com/scl/fi/6hlegg26bjg3atygs6jzt/PBIDesktop_dyxVyjg3MA.mp4?rlkey=9z7c9gaeky65v5lt3ktv6vrka&dl=0
- jeroenterheerdt
Microsoft Employee
Hi all, we are currently reviewing this idea. Stay tuned!
- AnonymousNot applicable
I have some SVG columns in my report. They do seem inefficient, having to store a lot of SVG in the model.
One trick I do is generating a bar per-row, then having a measure which combines the bars together into a single visual. This gives two presentations of the data (a single bar or several bars together) based on context. Therefore, being able to compose these functions towards a full SVG is important.
In one report, I had a matrix with completely custom SVG cells. I was never happy with it. I wanted to customise the total cells to give overall values for the appropriate context (row, column, matrix) but combined with field parameters it didn't ever work. It seems visual calcs give an easier path to detecting total context, so combined with parameter support in visual calcs, this would provide a path to this kind of visual.
- fbcideas_migusrNew MemberStatus added:Under Review
- avatorl
Impactful Individual
I have no idea how it happened that I was logged in as "a_3" here (using my private email, instead of my work email).
But I've just logged in to say I'm happy to see that UDF functions with SVG support are turning from a dream into reality 🙂
Recent ideas
Paste values in slicers for hierarchy data
Hierarchical slicers are widely used in enterprise reports (for example Product RCN > SKU Key, Region > Country > City, or GPP > Division > RCN > SKU). Users often need to bulk-filter by pasting valu...eddieisking20001 hour agoFrequent VisitorNew4Views0likes0CommentsPower Query Parameter create/use when connecting to a dataflow
In power query when you connect to a table in a dataflow there are no options to create or use a parameter for that dataflow. When connecting to SQL there is an option when setting up the connection ...ben_holmes3 hours agoNew MemberNeed Clarification204Views3likes2CommentsMake Copilot Approval status for semantic model available through API
In recent versions fabric allowed to mark a semantic model as approved for copilot to reduce AI adoption friction. However there is no specific way for external governance application to analyse whi...FrançoisD4 hours agoFrequent VisitorNew12Views2likes0CommentsClone a workspace, including its data, to a new workspace
Description: Today there's no way to fully clone a Fabric workspace: git sync and Deployment Pipelines move item definitions only, not the underlying data; Warehouse's zero-copy CREATE TABLE ... AS ...gclements5 hours agoHelper IINew14Views1like0CommentsAllow NotebookUtils getSecret() to authenticate with Workspace Identity
Current behavior In Microsoft Fabric, notebookutils.credentials.getSecret() authenticates against Azure Key Vault using the identity of the user who executes the notebook. This behavior appli...tmihara10 hours agoNew MemberNew8Views0likes0Comments