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

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.

Reply
Yagevendra
Helper IV
Helper IV

Same count for different percent values.

I have scutation where I created column chart with % on x axis and distinct values
on y axis based on the % and count column in data
So I have created measure to calculate values
Measure = SUMX(

    SUMMARIZE(Sheet1,

    Sheet1[%],

      Sheet1[Count]),

      CALCULATE(

          MAX(Sheet1[Count])

Here is my data show in blow table

A

B

C

D

E

F

G

Count

%

1

3655

3655

1154

1

145729

150048

1

40

1

3655

3655

1154

1

150755

152506

1

40

1

3659

3659

1164

2

184952

184954

8

60

1

3659

3659

1164

2

184956

184957

8

60

1

3659

3659

1164

2

184958

185048

8

60

 

Here is my chart which I have created on dashboard

Yagevendra_0-1643269996017.png

 



We have to show 40% of the values (1 to 40) on x axis with the same values which is reflected on 40% bar.

1 ACCEPTED SOLUTION
v-rzhou-msft
Community Support
Community Support

Hi @Yagevendra ,

 

If you want to show 40% in 40 and show 60% in 60, please try this code.

 

Measure = 
VAR _COUNT = CALCULATE(COUNT('Table'[Count]),ALLEXCEPT('Table','Table'[Count]))
VAR _TOTAL = CALCULATE(COUNT('Table'[Count]),ALL('Table'))
RETURN
DIVIDE(_COUNT,_TOTAL)

 

Result is as below.

1.png

If this reply still couldn't help you solve your problem, please tell us more details about your table. Will you use columns A,B,C,D...in your calculation? Please share a same file and show us a screenshot with the result you want.

 

Best Regards,
Rico Zhou

 

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

2 REPLIES 2
v-rzhou-msft
Community Support
Community Support

Hi @Yagevendra ,

 

If you want to show 40% in 40 and show 60% in 60, please try this code.

 

Measure = 
VAR _COUNT = CALCULATE(COUNT('Table'[Count]),ALLEXCEPT('Table','Table'[Count]))
VAR _TOTAL = CALCULATE(COUNT('Table'[Count]),ALL('Table'))
RETURN
DIVIDE(_COUNT,_TOTAL)

 

Result is as below.

1.png

If this reply still couldn't help you solve your problem, please tell us more details about your table. Will you use columns A,B,C,D...in your calculation? Please share a same file and show us a screenshot with the result you want.

 

Best Regards,
Rico Zhou

 

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

lbendlin
Super User
Super User

Please provide a more detailed explanation of what you are aiming to achieve. It is not clear (to me) from your description.  Your sample data doesn't seem to match the chart.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.