Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreGet certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. 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
Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
User | Count |
---|---|
87 | |
87 | |
86 | |
67 | |
49 |
User | Count |
---|---|
134 | |
113 | |
100 | |
68 | |
67 |