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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric 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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.