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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
OllyTron
Regular Visitor

Help with chart to show distribution

I have a list of names and values (value calculation shown in image). I want to create a chart that shows distribution of these values. The chart would have 1-40 along the bottom and a bar showing the total number of each '1ticket peryear'

So from the data below the value for 22 should = 7. As 22 shows 7 times in the dataset.

This feels like it should be easy but i can't get my brain to bring it together in PBI! TIA

 

OllyTron_0-1687203258324.png

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi  @OllyTron ,

I created some data:

vyangliumsft_0-1687315551206.png

 

Here are the steps you can follow:

1. Create measure.

Flag =
var _table=
SUMMARIZE(
    ALL('Table'),'Table'[Index],'Table'[Year],'Table'[TickerCount],"Value",
    CALCULATE(
    SUM('Table'[TickerCount])/DISTINCTCOUNT('Date'[Year])))
VAR _ADDCOUNT =ADDCOLUMNS(
    _table,"count",COUNTX(FILTER(_table,[Value]=EARLIER([Value])),[Value]))
return
SUMX(FILTER(_ADDCOUNT,[Index]= MAX('Table'[Index])),[count])

2. Result:

vyangliumsft_1-1687315551208.png

 

Best Regards,

Liu Yang

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
Anonymous
Not applicable

Hi  @OllyTron ,

I created some data:

vyangliumsft_0-1687315551206.png

 

Here are the steps you can follow:

1. Create measure.

Flag =
var _table=
SUMMARIZE(
    ALL('Table'),'Table'[Index],'Table'[Year],'Table'[TickerCount],"Value",
    CALCULATE(
    SUM('Table'[TickerCount])/DISTINCTCOUNT('Date'[Year])))
VAR _ADDCOUNT =ADDCOLUMNS(
    _table,"count",COUNTX(FILTER(_table,[Value]=EARLIER([Value])),[Value]))
return
SUMX(FILTER(_ADDCOUNT,[Index]= MAX('Table'[Index])),[count])

2. Result:

vyangliumsft_1-1687315551208.png

 

Best Regards,

Liu Yang

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

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.