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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Aquarius
Regular Visitor

Percentages by filter query

Hi, 

I've just started out with Power BI and having looked into the following query all afternoon, I'm struggling with the following:

I have two columns, I have managed to add column to work out the percetage by row but when I filter by day, I'm unable to get the percentages to show in the visual for the day:

Date           Total Products    Products Sold    Percentage 
01/11/21        39                            23                    59.0%
01/11/21        20                             1                     5.0%
01/11/21        20                              2                    20.0%

Totals             69                           26                     37.7%

Thank you so much. 


1 ACCEPTED SOLUTION
AlexisOlson
Super User
Super User

This is probably simplest with a measure.

PercentSold =
DIVIDE ( SUM ( Table1[Products Sold] ), SUM ( Table1[Total Products] ) )

View solution in original post

3 REPLIES 3
v-xiaoyan-msft
Community Support
Community Support

Hi @Aquarius ,

 

Does the replies above solve your problem? If it has been solved, please mark the correct reply as the standard answer to help the other members find it more quickly.Thanks in advance for your kind cooperation!

 

Hope it helps,


Community Support Team _ Caitlyn

If this post helps then please consider Accept it as the solution to help the other members find it more quickly.

AlexisOlson
Super User
Super User

This is probably simplest with a measure.

PercentSold =
DIVIDE ( SUM ( Table1[Products Sold] ), SUM ( Table1[Total Products] ) )

Thank you so much for your help. 😀

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.