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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

how to divide a value into 4 equal columns?

Hello, 

I have to create a column chart that takes a value (to calculate that value I have created a column) and divides it into 4 equal parts. But they must be ascending, so that if for example my value is 20 it shows:

G1 (0-5)
G2 (5-10)
G3(10-15)
G4(15-20)

 

Here is an example of the value I should use, it is a measure called "repeat_count", which counts the number of times the ID is repeated. I want to divide each of these rows in the way I have mentioned, is it possible? Thank you!

AndresGDS_1-1681733470864.png

 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous 

What the column chart you want? Can you provide the sample picture of the chart?

Based on the understand of  information you have offered, you can refer to the following example

Sample data 

vxinruzhumsft_0-1681884111903.png

 

Sample measure

Count = COUNTROWS('Table')

The first step:Create a table to display{"G1","G2","G3","G4"}

vxinruzhumsft_1-1681884175252.png

 

Then create a new measure

Measure 2 = VAR a=SUMMARIZE('Table',[Column1])
var b=ADDCOLUMNS(GENERATE(a,'Table (2)'),"Output",([Count]/4)*[ID])
return MAXX(FILTER(b,[Column1] in VALUES('Table'[Column1])&&[Gtype] IN VALUES('Table (2)'[Gtype])),[Output])

Output

vxinruzhumsft_2-1681884346462.png

 

Best Regards!

Yolo Zhu

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
grazitti_sapna
Super User
Super User

Hey,

For solving your problem. Firstly, you can create a table using create table and then store and display G1-G4

Like this:-

Create a table to display{"G1","G2","G3","G4"}

After that you can create a new measure to summarize the table where you can add the columns ID

Like this :-

To_summarise  = VAR=SUMMARIZE('Table',[Column1])

var b=ADDCOLUMNS(GENERATE(a,'Table (2)'),"Output",([Count]/4)*[ID])

return MAXX(FILTER(b,[Column1] in VALUES('Table'[Column1])&&[Gtype] IN VALUES('Table (2)'[Gtype])),[Output])

 

Anonymous
Not applicable

Hi @Anonymous 

What the column chart you want? Can you provide the sample picture of the chart?

Based on the understand of  information you have offered, you can refer to the following example

Sample data 

vxinruzhumsft_0-1681884111903.png

 

Sample measure

Count = COUNTROWS('Table')

The first step:Create a table to display{"G1","G2","G3","G4"}

vxinruzhumsft_1-1681884175252.png

 

Then create a new measure

Measure 2 = VAR a=SUMMARIZE('Table',[Column1])
var b=ADDCOLUMNS(GENERATE(a,'Table (2)'),"Output",([Count]/4)*[ID])
return MAXX(FILTER(b,[Column1] in VALUES('Table'[Column1])&&[Gtype] IN VALUES('Table (2)'[Gtype])),[Output])

Output

vxinruzhumsft_2-1681884346462.png

 

Best Regards!

Yolo Zhu

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

 

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.