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.
Hi all,
I need to view image logo only in 1 unique element of a slicer is selected:
My problem is that only calculated columns are available to be categorized as url of image
I tried creating this measure:
Selected = SELECTEDVALUE(Images[logo])
And image should be displayed based on this formula (problem is that a measure is not valid to be categorized as image url)
calc_image = IF( ISBLANK([Selected]); BLANK(); [Selected])
Sample PBIX:
https://1drv.ms/u/s!Am7buNMZi-gwkAVpbGpxqpsXySqZ
Data , table images with 3 rows (product, logo)
Report View: Slicer with product
Regards
Solved! Go to Solution.
You may refer to the code below.
tmp = Table.AddColumn(Table.FromList(Table.ColumnNames(dbo_stg_investors)), "Custom", each null), result = Table.InsertRows(dbo_stg_investors , 0 , Table.ToRecords(Table.Pivot(tmp, List.Distinct(tmp[Column1]), "Column1", "Custom"))) in result
Values in a calculated column are fixed. As a workaround, you may add a blank row.
@v-chuncz-msftI am not following how a blank row helps me? did you understand my issue?
Just try it, you'll see the difference.
It works, however i had to manually add 1 row with an space character to product column and empty image url.
Is there any smart way to ADD a blank row into an existing table for example of SQL Server.
Something link given a big table + 1 Blank row in power query / DAX @v-chuncz-msft
You may use Table.InsertRows function.
How can I add a blank row to this M code
let
Origen = Sql.Database(servidor, base_datos),
dbo_stg_investors = Origen{[Schema="dbo",Item="stg_investors"]}[Data]
in
dbo_stg_investors
You may refer to the code below.
tmp = Table.AddColumn(Table.FromList(Table.ColumnNames(dbo_stg_investors)), "Custom", each null), result = Table.InsertRows(dbo_stg_investors , 0 , Table.ToRecords(Table.Pivot(tmp, List.Distinct(tmp[Column1]), "Column1", "Custom"))) in result
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 |
---|---|
110 | |
95 | |
76 | |
65 | |
51 |
User | Count |
---|---|
146 | |
109 | |
106 | |
88 | |
61 |