Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Having a brain fart. I've got hundreds of images I can bring into my Power BI reports via Sharepoint, and Bas has a good youtube video for how to do this, but only in a measure where he uses the Switch function. (He says this can also work in a column, but it didn't work for me, so I'm going back to a measure.)
He uses the SWITCH function:
Image Product Category =
SWITCH(
MAX(dimProduct[ProductCategoryName]),
"Audio", "Image1",
"Computers", "Image2",
"Cell Phones", "Image3"
)
...but I don't want to list every single instance and then its URL. I'm using loan numbers and pictures of their collateral. I just want to say "when you see this loan number, post its respective image." What is the syntax for that?
Thanks.
Solved! Go to Solution.
Hi @bonjourposte -You're on the right track with using the SWITCH function, but as you've noticed, manually listing every image URL for each loan number can get cumbersome, especially with hundreds of images. Instead, you can simplify this by creating a relationship between your loan numbers and their respective image URLs in a table, and then use a measure to dynamically return the image URL based on the loan number.
You can create a measure using CONCATENATE (or &) to build the full image URL dynamically from the loan number:
LoanImageURL =
VAR LoanNumber = MAX(LoanData[LoanNumber]) -- Get the current loan number
RETURN
"https://yoursharepointsite/images/" & LoanNumber & ".jpg" -- Construct the URL dynamically
You don’t need to create a separate table with loan numbers and URLs. Hope this works in your case.
Proud to be a Super User! | |
Hi @bonjourposte -You're on the right track with using the SWITCH function, but as you've noticed, manually listing every image URL for each loan number can get cumbersome, especially with hundreds of images. Instead, you can simplify this by creating a relationship between your loan numbers and their respective image URLs in a table, and then use a measure to dynamically return the image URL based on the loan number.
You can create a measure using CONCATENATE (or &) to build the full image URL dynamically from the loan number:
LoanImageURL =
VAR LoanNumber = MAX(LoanData[LoanNumber]) -- Get the current loan number
RETURN
"https://yoursharepointsite/images/" & LoanNumber & ".jpg" -- Construct the URL dynamically
You don’t need to create a separate table with loan numbers and URLs. Hope this works in your case.
Proud to be a Super User! | |
User | Count |
---|---|
116 | |
73 | |
58 | |
49 | |
48 |
User | Count |
---|---|
171 | |
122 | |
60 | |
59 | |
56 |