Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
Irwin
Helper IV
Helper IV

Import excel table with dynamic images

Hey everybody,

 

I am an absolute beginner at PowerBi. I have made an excel table (would love to attach but forum wont let me), wherein you can select 3 values. Theses 3 values then translate to an image (smileys). This is displayed on another page in a table.


Is it possible to import this table (as is) into powerbi? When I import the excel file it just shows data.

1 ACCEPTED SOLUTION

Hi @Irwin ,

 

Create 2 measures as below:

Measure_output1 = 
IF(ISFILTERED(Table2[Column1]),
SWITCH(SELECTEDVALUE(Table2[Column1]),
"Happy",
CALCULATE(MAX('Table1'[Output 1]),FILTER('Table1','Table1'[Output 1]="😊")),
"Medium",
CALCULATE(MAX('Table1'[Output 1]),FILTER('Table1','Table1'[Output 1]="🤔")),
"Sad",
CALCULATE(MAX('Table1'[Output 1]),FILTER('Table1','Table1'[Output 1]="😢"))),
CALCULATE(MAX('Table1'[Output 1]),FILTER('Table1','Table1'[A]=SELECTEDVALUE(Table1[A]))))
Measure_output2 = 
IF(ISFILTERED(Table2[Column1]),
SWITCH(SELECTEDVALUE(Table2[Column1]),
"Happy",
CALCULATE(MAX('Table1'[Output 2]),FILTER('Table1','Table1'[Output 2]="😊")),
"Medium",
CALCULATE(MAX('Table1'[Output 2]),FILTER('Table1','Table1'[Output 2]="🤔")),
"Sad",
CALCULATE(MAX('Table1'[Output 2]),FILTER('Table1','Table1'[Output 2]="😢"))),
CALCULATE(MAX('Table1'[Output 1]),FILTER('Table1','Table1'[A]=SELECTEDVALUE(Table1[A]))))

And you will see:

v-kelly-msft_0-1611889656276.pngv-kelly-msft_1-1611889667372.pngv-kelly-msft_2-1611889677878.png

For the related .pbix file,pls see attached.

 

Best Regards,
Kelly

Did I answer your question? Mark my post as a solution!

View solution in original post

11 REPLIES 11
Irwin
Helper IV
Helper IV

Thank you. 

 

So this means I can still import the dynamic values (1,2,3) and then create the image display in PowerBi itself?

Hi  @Irwin ,

 

Not sure whether I understand correctly. Coud you pls attach some screenshots to make your requirement more clear?

 

Best Regards,
Kelly

Did I answer your question? Mark my post as a solution!

Sure.

 

I think most of the problem stems from me being super new to all of this.
The below scren is what I have made in excel. When I change a value (sad/medium/happy... could as well be 1,2,3) the smiley changes correspondingly. I would like to be able to change the value (sad/medium/happy) in excel and  then the smiley table would import this value in PowerBi.

Irwin_0-1611129787628.png

 

I now realize that I need to create the value to image part inside powerbi, however, watching tutorials have not quite equiped me to do so yet on my own 😉
Any help is appreciated! 

Hi @Irwin ,

First create dim table as below:

v-kelly-msft_0-1611208750050.png

Then create 2 measures as below:

Measure_emoji1 = 
SWITCH(SELECTEDVALUE('dim table'[category]),
"happy",
CALCULATE(MAX('Table'[emoj 1]),FILTER('Table','Table'[emoj 1]=UNICHAR("128512"))),
"angry",
CALCULATE(MAX('Table'[emoj 1]),FILTER('Table','Table'[emoj 1]=UNICHAR("128520"))))
Measure_emoji2 = 
SWITCH(SELECTEDVALUE('dim table'[category]),
"happy",
CALCULATE(MAX('Table'[emoj 2]),FILTER('Table','Table'[emoj 2]=UNICHAR("128512"))),
"angry",
CALCULATE(MAX('Table'[emoj 2]),FILTER('Table','Table'[emoj 2]=UNICHAR("128520"))))

And you will see:

v-kelly-msft_1-1611208802014.pngv-kelly-msft_2-1611209030013.png

For the unichar of emoji,see below for reference:

https://powerbidocs.com/2020/06/08/how-to-use-emojis-emotions-on-power-bi/

 

My sample .pbix file is attached,you may turn to it if needed.

 

 

Best Regards,
Kelly

Did I answer your question? Mark my post as a solution!

 

Hi Kelly,

 

I have now had proper time to read your excellent feedback and mess around with it myself. I think that the main reason I cannot (could not?) get this to work is my lack of basic understanding. I am very much trying to work on that! 🙂

 

I have now managed to contruct something that I am quite satisfied with:

Irwin_1-1611658608804.png

 

 

however, I cannot make it display correctly in the report. It just shows the first 5 rows.... why? 

Irwin_2-1611658692590.png

 

Thank you for any assistance.

Thank you so much for this! I have not yet managed to completly set it up as I want but I am really learning from you attached file. I will look into it more when time at work permits it.

 

Again really appreciate it. 🙂

Hi  @Irwin ,

 

Sorry for the late reply!

It's because that my sample data structure is different from yours ,could you pls upload your .pbix file to onedrive business and share the link with us?

Remember to remove the confidential information.

 

Best Regards,
Kelly

Did I answer your question? Mark my post as a solution!

Hi Kelly,

 

No worries. I am just thank full for the assistance. I believe you should be able to access the file in the below link.

 

https://arlafoods-my.sharepoint.com/:u:/p/amibr/EdflN7UW6rVOlS2nkgjqwUcB04yrwDKX47IjHMCsSsvKdA?e=sTK...

Hi @Irwin ,

 

Create 2 measures as below:

Measure_output1 = 
IF(ISFILTERED(Table2[Column1]),
SWITCH(SELECTEDVALUE(Table2[Column1]),
"Happy",
CALCULATE(MAX('Table1'[Output 1]),FILTER('Table1','Table1'[Output 1]="😊")),
"Medium",
CALCULATE(MAX('Table1'[Output 1]),FILTER('Table1','Table1'[Output 1]="🤔")),
"Sad",
CALCULATE(MAX('Table1'[Output 1]),FILTER('Table1','Table1'[Output 1]="😢"))),
CALCULATE(MAX('Table1'[Output 1]),FILTER('Table1','Table1'[A]=SELECTEDVALUE(Table1[A]))))
Measure_output2 = 
IF(ISFILTERED(Table2[Column1]),
SWITCH(SELECTEDVALUE(Table2[Column1]),
"Happy",
CALCULATE(MAX('Table1'[Output 2]),FILTER('Table1','Table1'[Output 2]="😊")),
"Medium",
CALCULATE(MAX('Table1'[Output 2]),FILTER('Table1','Table1'[Output 2]="🤔")),
"Sad",
CALCULATE(MAX('Table1'[Output 2]),FILTER('Table1','Table1'[Output 2]="😢"))),
CALCULATE(MAX('Table1'[Output 1]),FILTER('Table1','Table1'[A]=SELECTEDVALUE(Table1[A]))))

And you will see:

v-kelly-msft_0-1611889656276.pngv-kelly-msft_1-1611889667372.pngv-kelly-msft_2-1611889677878.png

For the related .pbix file,pls see attached.

 

Best Regards,
Kelly

Did I answer your question? Mark my post as a solution!

@Irwin , You can import excel as data. Unichar and some other formats can be used to create images. You have a check that out

Unichar :

https://community.powerbi.com/t5/Desktop/FORMAT-icon-set-for-use-in-a-data-card/td-p/811692

https://exceleratorbi.com.au/dax-unichar-function-power-bi/

amitchandak
Super User
Super User

@Irwin , Excel is only for data export. You can export ppt or pdf the display format.

https://docs.microsoft.com/en-us/power-bi/visuals/power-bi-visualization-export-data

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.