Forum Discussion
alanhanssen
9 years agoFrequent Visitor
Percentage one value appears in another table
Hello, I'm new in PowerBI, I'm taking the PowerBI Course in EdX to avoid silly questions but I can't get this solution done. I have a table Blogs and the Table Photos, I want to show the percent...
- 9 years ago
Hello,
Use these measures:
Count_BlogwithPhotos = CALCULATE(DISTINCTCOUNT(Blogs[BlogiD]),RELATEDTABLE(Photos))
Count_NoBlogwithPhotos = DISTINCTCOUNT(Blogs[BlogiD])-[Count_BlogwithPhotos]
Finally, Put both measure in chart values.
- 9 years ago
Hi, alanhanssen
Create a measure:
Count_BlogwithPhotos = CALCULATE(DISTINCTCOUNT(Blog[Blog_ID]),RELATEDTABLE(Photo))
Add a calculated column in Blog table:
Column 2 = IF(LOOKUPVALUE(Photo[Blog_ID],Photo[Blog_ID],Blog[Blog_ID])=Blog[Blog_ID],"Attached","UnAttached")
Then, thepie chart should be like:
Best regards,
Yuliana Gu
Vvelarde
Community Champion
9 years agoHello,
Use these measures:
Count_BlogwithPhotos = CALCULATE(DISTINCTCOUNT(Blogs[BlogiD]),RELATEDTABLE(Photos))
Count_NoBlogwithPhotos = DISTINCTCOUNT(Blogs[BlogiD])-[Count_BlogwithPhotos]
Finally, Put both measure in chart values.