Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Hi all,
I need help with creation of dynamic histogram.
I have a table with one columns being Case ids, that can appear multiple times.
I need to create a column chart with x axis showing, 0,1,2,3,4..... which represent how many times case id appears in a table, and y axis showing how many distinct Case ids are in that category?
I have tried summarise and groupby daax, but nothing i tried worked.
Example of what i have:
Case Id |
123 |
234 |
345 |
456 |
123 |
123 |
345 |
Example of what i am trying to achieve:
Count Category | Number of distinct cases |
1 | 2 |
2 | 1 |
3 | 1 |
PLease assist
Thank you
Filarap
Solved! Go to Solution.
There is a custom visual called Histogram, available in the store.
Otherwise, if you don't want to use a custom visual:
(Edit from my last answer to make dynamic:)
Create this table:
Hist = GENERATESERIES(1,100,1)
Then this measure:
Histogram Values = var _table= ADDCOLUMNS(VALUES('Table'[Column1]),"CountValue",CALCULATE(COUNT('Table'[Column1]))) var _selected = SELECTEDVALUE(Hist[Value]) RETURN COUNTX(FILTER(_table,[CountValue]=_selected),[CountValue])
Change 'Table'[Column1] to your Column.
Now make a column chart and use Hist[Value] in the axis, and the measure [Histogram Values] in values.
Love hearing about Power BI tips, jobs and news?
I love to share about these - connect with me!
Stay up to date on
Read my blogs on
Remember to spread knowledge in the community when you can!
Did I answer your question? Mark my post as a solution! Proud to be a Super User!
Connect with me!
Stay up to date on
Read my blogs on
There is a custom visual called Histogram, available in the store.
Otherwise, if you don't want to use a custom visual:
(Edit from my last answer to make dynamic:)
Create this table:
Hist = GENERATESERIES(1,100,1)
Then this measure:
Histogram Values = var _table= ADDCOLUMNS(VALUES('Table'[Column1]),"CountValue",CALCULATE(COUNT('Table'[Column1]))) var _selected = SELECTEDVALUE(Hist[Value]) RETURN COUNTX(FILTER(_table,[CountValue]=_selected),[CountValue])
Change 'Table'[Column1] to your Column.
Now make a column chart and use Hist[Value] in the axis, and the measure [Histogram Values] in values.
Love hearing about Power BI tips, jobs and news?
I love to share about these - connect with me!
Stay up to date on
Read my blogs on
Remember to spread knowledge in the community when you can!
Did I answer your question? Mark my post as a solution! Proud to be a Super User!
Connect with me!
Stay up to date on
Read my blogs on
User | Count |
---|---|
82 | |
72 | |
67 | |
47 | |
36 |
User | Count |
---|---|
111 | |
56 | |
50 | |
42 | |
40 |