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.
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 percentage of Blogs that has photos attached. Blogs Table has no indicator about it. You can only see in Photos table the blog ID which that photo is attached if is attached to a blog.
Any suggestion to display the percentage of blogs that has 1 or more photos?
I know the number already by making a distinct count of blog_id in the photo table but I cannot make the Pie chart with the total.
Solved! Go to Solution.
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.
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
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
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.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
113 | |
97 | |
85 | |
70 | |
61 |
User | Count |
---|---|
151 | |
121 | |
104 | |
87 | |
67 |