Forum Discussion
How to display different image based on different measure
so there are different project status, and category, i will be doing a measure, if all project in that category is completed, will be "Completed" or "Incomplete". I will like to find a way to dispay tick or cross based on completee or incomplete. How can i do it?
Thanks in advance
- Anonymous3 years ago
Hi Anonymous ,
Suppose we have a table like:
then please new a mesure like:
Measure = VAR _countrows_1 = DISTINCTCOUNT('Table'[Status]) VAR _countrows_2 = CALCULATE(DISTINCTCOUNT('Table'[Status]),'Table'[Status]="Completed") VAR _result = IF(_countrows_1=1&&_countrows_2=1,"https://cdn-icons-png.flaticon.com/512/190/190411.png","https://cdn-icons-png.flaticon.com/512/190/190406.png") RETURN _resultchange the data category to 'Image URL':
result:
Best Regards,
Gao
Community Support TeamIf there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data in the Power BI Forum
5 Replies
- amitchandak
Super User
Anonymous , Create a text measure as image URL(Text make are Image URL in category) , make sure that URL is accessible
- AnonymousNot applicable
hi can u tell me how to do it exactly?
im still new to powerbi
- AnonymousNot applicable
Hi Anonymous ,
Suppose we have a table like:
then please new a mesure like:
Measure = VAR _countrows_1 = DISTINCTCOUNT('Table'[Status]) VAR _countrows_2 = CALCULATE(DISTINCTCOUNT('Table'[Status]),'Table'[Status]="Completed") VAR _result = IF(_countrows_1=1&&_countrows_2=1,"https://cdn-icons-png.flaticon.com/512/190/190411.png","https://cdn-icons-png.flaticon.com/512/190/190406.png") RETURN _resultchange the data category to 'Image URL':
result:
Best Regards,
Gao
Community Support TeamIf there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data in the Power BI Forum
- AnonymousNot applicable
Hi, i have encounter a new problem, can i juz show this measure as an image only? but not inserting it into the table.
- Celia92Frequent Visitor
HI!! Where did you get that URL? I get from flaticon but it doesn't show the picture correctly.
Thanks 🙂