Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hello,
i need to show an url coming from a calculated measure in the custom component img viewer visual.
This is my formula:
Measure = SWITCH(average(table_1[avg_pages])-average(table_2[avg_pages]); 0; arrowup.png; 10; arrowdown.png)
I am working in direct query mode, so it is not possible to use dax expressions in caluclated column,
and I don't get why it is working in a measure.
My problem is that this custom component only works with columns since url are srtings!
Is there any way to solve it?
Solved! Go to Solution.
Hi @gionniz,
>>My problem is that this custom component only works with columns since url are srtings!
Based on test, the measure will return string values and we are not able to format measure values data type as “Image URL”. While the image viewer visual only supports image URL values, it’s not supported to generate image based on measure values.
To work around the issue, you can use query editor to create a custom column like below:
Add a custom column to get the result string:
let
Source = Sql.Databases("xxxxx"),
Datatable = Source{[Name="xxxxx"]}[Data],
dbo_Table_1 = Datatable {[Schema="dbo",Item="Table_1"]}[Data],
#"Added Custom" = Table.AddColumn(dbo_Table_1, "Custom", each if List.Average(Table.Column(Table_2, "decimal value"))- List.Average(Table.Column(dbo_Table_1, “amount”)) >50 then "http://www.clipartbest.com/cliparts/jix/pjG/jixpjGdiE.png" else "http://www.freeiconspng.com/uploads/checked-correct-right-yes-checkmark-12.png")
in
#"Added Custom"
Drag the custom column to imageview:
Regards,
Xiaoxin Sheng
Hi @gionniz,
>>My problem is that this custom component only works with columns since url are srtings!
Based on test, the measure will return string values and we are not able to format measure values data type as “Image URL”. While the image viewer visual only supports image URL values, it’s not supported to generate image based on measure values.
To work around the issue, you can use query editor to create a custom column like below:
Add a custom column to get the result string:
let
Source = Sql.Databases("xxxxx"),
Datatable = Source{[Name="xxxxx"]}[Data],
dbo_Table_1 = Datatable {[Schema="dbo",Item="Table_1"]}[Data],
#"Added Custom" = Table.AddColumn(dbo_Table_1, "Custom", each if List.Average(Table.Column(Table_2, "decimal value"))- List.Average(Table.Column(dbo_Table_1, “amount”)) >50 then "http://www.clipartbest.com/cliparts/jix/pjG/jixpjGdiE.png" else "http://www.freeiconspng.com/uploads/checked-correct-right-yes-checkmark-12.png")
in
#"Added Custom"
Drag the custom column to imageview:
Regards,
Xiaoxin Sheng
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
117 | |
104 | |
77 | |
73 | |
50 |
User | Count |
---|---|
145 | |
109 | |
108 | |
90 | |
64 |