Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
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
User | Count |
---|---|
124 | |
106 | |
99 | |
63 | |
59 |
User | Count |
---|---|
135 | |
116 | |
101 | |
71 | |
61 |