cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper IV
Helper IV

Calculating Measure

Hi,

 

I have this following situation where I want to calculate = Sum of (product sale by group)/Sum of Total product in Group

 

From this data, desired output is: = (599/2332) = 0.25

 

Thanks in Advance

 

ProductGroupProduct sale by GroupTotal product in group
P1G178122
P1G22448
P1G31876
P1G449160
P2G139123
P2G2641
P2G31957
P2G455152
P3G139139
P3G2731
P3G3571
P3G417132
P4G118122
P4G23047
P4G31361
P4G49115
P5G18122
P5G21649
P5G32115
P5G440123
P6G11495
P6G22666
P6G39121
P6G458144
1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Microsoft
Microsoft

Re: Calculating Measure

This will give you the result you say you want, regardless of what/where you filter.  Not sure if that is what you are after though

 

New Measure = DIVIDE(
                    CALCULATE(
                        SUM(Table1[Product sale by Group]),
                        ALL('Table1')
                        )
                       ,                    CALCULATE(
                        SUM(Table1[Total product in group]),
                        ALL('Table1')
                        )
					)

To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

View solution in original post

3 REPLIES 3
Highlighted
Responsive Resident
Responsive Resident

Re: Calculating Measure

Hi

 

Not sure if I got you right. The formula of your measure would be:

 

=DIVIDE(
     SUM(product sale by group),
     SUM(Total product in Group),
     0)
    

Hope this helps

JJ

 

Highlighted
Microsoft
Microsoft

Re: Calculating Measure

This will give you the result you say you want, regardless of what/where you filter.  Not sure if that is what you are after though

 

New Measure = DIVIDE(
                    CALCULATE(
                        SUM(Table1[Product sale by Group]),
                        ALL('Table1')
                        )
                       ,                    CALCULATE(
                        SUM(Table1[Total product in group]),
                        ALL('Table1')
                        )
					)

To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

View solution in original post

Highlighted
Microsoft
Microsoft

Re: Calculating Measure

Hi @aktripathi2506,

As the @Phil_Seamark posted, create a measure using the formula and create a card to display the expected result as follows.

12.PNG

If you have resolved your issue, please mark the right reply as answer, if it doesn't, please feel free to ask.

Best Regards,
Angelia

Helpful resources

Announcements
August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

July 2020 Community Highlights

July 2020 Community Highlights

Learn about the exciting things that happened in July.

Upcoming Events

Upcoming Events

Wondering what events you could join or have an event to promote yourself? Check out our Upcoming Events.

Get Ready for Power BI Dev Camp

Get Ready for Power BI Dev Camp

We are thrilled to announce we will begin running a monthly webinar series named Power BI Dev Camp.

Top Solution Authors
Top Kudoed Authors