Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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
Solved! Go to Solution.
Hi @OllyTron ,
I created some data:
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:
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
Hi @OllyTron ,
I created some data:
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:
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
User | Count |
---|---|
22 | |
11 | |
8 | |
6 | |
6 |
User | Count |
---|---|
25 | |
13 | |
11 | |
9 | |
6 |