Forum Discussion
Import excel table with dynamic images
- 5 years ago
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:
For the related .pbix file,pls see attached.
Best Regards,
KellyDid I answer your question? Mark my post as a solution!
Hi Irwin ,
First create dim table as below:
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:
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!
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. π
- v-kelly-msft5 years agoCommunity Support
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,
KellyDid I answer your question? Mark my post as a solution!
- Irwin5 years agoHelper IV
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.
- v-kelly-msft5 years agoCommunity Support
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:
For the related .pbix file,pls see attached.
Best Regards,
KellyDid I answer your question? Mark my post as a solution!