cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
VivekC
Helper II
Helper II

DIVISION OF VALUES IN THE SAME COLUMN OF A TABLE

Hello All,

 

We are not able to calculate the below requirement. Please guide us.

 

100.PNG

 

 

 

 

We want the requirement as :

a) 5 divided by 7 and the result should be 71%

b) 5 divivded by 20 and the result should be 25%

c) 16 divivded by 31 and the result should be 52%

d) 55 divided by 63 and the result should be 87%

 

Thanks in Advance.

 

Regards,

Vivek Chavan.

1 ACCEPTED SOLUTION
v-cherch-msft
Microsoft
Microsoft

Hi @VivekC

 

You may try to use HASONEVALUE Function to create measures to get the percent as requested. For example:

 

Percent1 =
IF (
    HASONEVALUE ( total[Index] ),
    MAX ( total[a] ),
    DIVIDE (
        SUMX ( FILTER ( total, total[Index] = 1 ), total[a] ),
        SUMX ( FILTER ( total, total[Index] = 2 ), total[a] )
    )
)

1.png

 

Regards,

Cherie

Community Support Team _ Cherie Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
v-cherch-msft
Microsoft
Microsoft

Hi @VivekC

 

You may try to use HASONEVALUE Function to create measures to get the percent as requested. For example:

 

Percent1 =
IF (
    HASONEVALUE ( total[Index] ),
    MAX ( total[a] ),
    DIVIDE (
        SUMX ( FILTER ( total, total[Index] = 1 ), total[a] ),
        SUMX ( FILTER ( total, total[Index] = 2 ), total[a] )
    )
)

1.png

 

Regards,

Cherie

Community Support Team _ Cherie Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May 23 2022 epsiode 5 without aka link.jpg

The Power BI Community Show

Welcome to the Power BI Community Show! Jeroen ter Heerdt talks about the importance of Data Modeling.

Power BI Dev Camp Session 22 with aka link 768x460.jpg

Check it out!

Mark your calendars and join us on Thursday, May 26 at 11a PDT for a great session with Ted Pattison!

charticulator_carousel_with_text (1).png

Charticulator Design Challenge

Put your data visualization and design skills to the test! This exciting challenge is happening now through May 31st!