<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Creating histogram using measure and dimension from data warehouse in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Creating-histogram-using-measure-and-dimension-from-data/m-p/4311013#M171211</link>
    <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for the solution. I think switching from SQL Server thinking to DAX thinking is not easy.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It appears Microsft removed its perfectly good histogram visualization from the Powerbi market place in 2022.&amp;nbsp; It would be good for that to be added back in again.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Excel has histogram graphs built in, why doesnt powerbi? Its a mystery.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 03 Dec 2024 06:42:58 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2024-12-03T06:42:58Z</dc:date>
    <item>
      <title>Creating histogram using measure and dimension from data warehouse</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Creating-histogram-using-measure-and-dimension-from-data/m-p/4308567#M171114</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I use one dimension and one measure to create the simple 2 column table, then change it to a clustered column chart by choosing "clustered column chart" from Visualisations area.&amp;nbsp; The chart shows the individual Measure values along the x-axis as columns with the dimension as the Y axis.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, rather than just have columns of individual values, we would like to condense down the data into a histogram with ranges and frequencies. I have read that I can create groups and buckets etc and do it that way, but our powerbi setup for some reason wont allow us to create groups.&amp;nbsp; So to work around that issue, do I need to export the data from the table/graph to a new separate powerbi file that will allow groups to be created? ( or maybe just export to excel and do histogram there? )&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have also tried a couple of histogram visuals from marketplace, but they seem a bit flaky.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We would be grateful to know who to code up a solution of a histogram via DAX, maybe it can be done via maybe custom measures drawing data from the original table?&amp;nbsp; but am not sure how it would be done?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Sun, 01 Dec 2024 04:27:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Creating-histogram-using-measure-and-dimension-from-data/m-p/4308567#M171114</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-12-01T04:27:36Z</dc:date>
    </item>
    <item>
      <title>Re: Creating histogram using measure and dimension from data warehouse</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Creating-histogram-using-measure-and-dimension-from-data/m-p/4308626#M171115</link>
      <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;If you could add calcualted column to your table with the following formula and visualize your histogram, it would work too. This would be static though.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Bin = 
SWITCH(
    TRUE(),
    [Value] &amp;gt;= 0 &amp;amp;&amp;amp; [Value] &amp;lt;= 10, "0-10",
    [Value] &amp;gt;= 11 &amp;amp;&amp;amp; [Value] &amp;lt;= 20, "11-20",
    [Value] &amp;gt;= 21 &amp;amp;&amp;amp; [Value] &amp;lt;= 30, "21-30",
    [Value] &amp;gt;= 31 &amp;amp;&amp;amp; [Value] &amp;lt;= 40, "31-40",
    "Other"
)
&lt;/LI-CODE&gt;
&lt;P&gt;&lt;BR /&gt;The other option is to have&amp;nbsp; disconnected table and do it with a measure as.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 01 Dec 2024 07:14:15 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Creating-histogram-using-measure-and-dimension-from-data/m-p/4308626#M171115</guid>
      <dc:creator>Fowmy</dc:creator>
      <dc:date>2024-12-01T07:14:15Z</dc:date>
    </item>
    <item>
      <title>Re: Creating histogram using measure and dimension from data warehouse</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Creating-histogram-using-measure-and-dimension-from-data/m-p/4309204#M171126</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can create a histogram in Power BI using DAX without exporting data. Here’s a simple way:&lt;/P&gt;&lt;P&gt;1. Create Ranges for the Histogram:&lt;BR /&gt;- Add a calculated column to your table in Power BI to define buckets/ranges. For example:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Range =
SWITCH(
TRUE(),
[Measure] &amp;lt;= 10, "0-10",
[Measure] &amp;lt;= 20, "11-20",
[Measure] &amp;lt;= 30, "21-30",
"31+"
)&lt;/LI-CODE&gt;&lt;P&gt;2. Build the Histogram:&lt;BR /&gt;- Use the &lt;STRONG&gt;Range&lt;/STRONG&gt; column as the X-axis (Legend/Axis) in your chart.&lt;BR /&gt;- Use a measure like `Count` or `Sum` of the original values for the Y-axis.&lt;/P&gt;&lt;P&gt;3. Refine the Chart:&lt;BR /&gt;- Format your clustered column chart to show the ranges clearly.&lt;/P&gt;&lt;P&gt;This method avoids relying on groups or exporting data. You can adjust the ranges in the DAX formula as needed!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Did I answer your question? Mark my post as a solution, this will help others!&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;If my response(s) assisted you in any way, don't forget to drop me a "&lt;STRONG&gt;Kudos&lt;/STRONG&gt;" &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Kind Regards,&lt;BR /&gt;Poojara&lt;BR /&gt;Data Analyst | MSBI Developer | Power BI Consultant&lt;BR /&gt;&lt;STRONG&gt;Please Subscribe my YouTube for Beginners/Advance Concepts:&lt;/STRONG&gt;&amp;nbsp;&lt;A href="https://youtube.com/@biconcepts?si=04iw9SYI2HN80HKS" target="_self"&gt;https://youtube.com/@biconcepts?si=04iw9SYI2HN80HKS&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 02 Dec 2024 05:06:32 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Creating-histogram-using-measure-and-dimension-from-data/m-p/4309204#M171126</guid>
      <dc:creator>Poojara_D12</dc:creator>
      <dc:date>2024-12-02T05:06:32Z</dc:date>
    </item>
    <item>
      <title>Re: Creating histogram using measure and dimension from data warehouse</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Creating-histogram-using-measure-and-dimension-from-data/m-p/4311001#M171210</link>
      <description>&lt;P style="margin: 0in; font-family: Arial; font-size: 12.0pt; color: black;"&gt;Thanks for the reply from Poojara_D12&amp;nbsp; and Fowmy&amp;nbsp;, please allow me to provide another insight:&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Arial; font-size: 12.0pt; color: black;"&gt;Hi,&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Arial; font-size: 12.0pt; color: black;" lang="zh-CN"&gt;Have the answers from Poojara_D12&amp;nbsp; and Fowmy resolved your issue? If so, please mark their responses as the solution. This will help others with similar questions find the answers more quickly.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Arial; font-size: 12.0pt; color: black;" lang="zh-CN"&gt;Regarding your question, I have also created the following example:&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Arial; font-size: 12.0pt; color: black;"&gt;&lt;SPAN&gt;1.&lt;/SPAN&gt;&lt;SPAN&gt;Firstly, here is my sample data:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Bins = 
DATATABLE(
    "Bin", INTEGER,
    {
        {0},
        {10},
        {20},
        {30},
        {40},
        {50},
        {60},
        {70},
        {80},
        {90},
        {100}
    }
)
&lt;/LI-CODE&gt;
&lt;P style="margin: 0in; font-family: Arial; font-size: 12.0pt; color: black;"&gt;&lt;SPAN&gt;2.&lt;/SPAN&gt;&lt;SPAN&gt;Secondly, I have created the following calculation table:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Arial; font-size: 12.0pt; color: black;"&gt;&lt;SPAN&gt;3.&lt;/SPAN&gt;&lt;SPAN&gt;Next, I have created the following measures:&lt;/SPAN&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Frequency = 
COUNTROWS(
    FILTER(
        TestData,
        TestData[Value] &amp;gt;=MAX('Bins'[Bin])&amp;amp;&amp;amp; TestData[Value] &amp;lt; MAX('Bins'[Bin]) + 10
    )
)
&lt;/LI-CODE&gt;
&lt;P style="margin: 0in; font-family: Arial; font-size: 12.0pt; color: black;"&gt;4.Here's my final result, which I hope meets your requirements.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Arial; font-size: 12.0pt; color: black;"&gt;Please find the attached pbix relevant to the case.&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Arial; font-size: 12.0pt; color: black;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Arial; font-size: 12.0pt; color: black;"&gt;Best Regards,&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Arial; font-size: 12.0pt; color: black;"&gt;Leroy Lu&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Arial; font-size: 12.0pt; color: black;"&gt;If this post&lt;EM&gt;&lt;STRONG&gt; helps,&lt;/STRONG&gt;&lt;/EM&gt; then please consider Accept it &lt;EM&gt;&lt;STRONG&gt;as the solution &lt;/STRONG&gt;&lt;/EM&gt;to help the other members find it more quickly.&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Arial; font-size: 12.0pt; color: black;"&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Dec 2024 06:34:16 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Creating-histogram-using-measure-and-dimension-from-data/m-p/4311001#M171210</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-12-03T06:34:16Z</dc:date>
    </item>
    <item>
      <title>Re: Creating histogram using measure and dimension from data warehouse</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Creating-histogram-using-measure-and-dimension-from-data/m-p/4311013#M171211</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for the solution. I think switching from SQL Server thinking to DAX thinking is not easy.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It appears Microsft removed its perfectly good histogram visualization from the Powerbi market place in 2022.&amp;nbsp; It would be good for that to be added back in again.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Excel has histogram graphs built in, why doesnt powerbi? Its a mystery.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Dec 2024 06:42:58 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Creating-histogram-using-measure-and-dimension-from-data/m-p/4311013#M171211</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-12-03T06:42:58Z</dc:date>
    </item>
  </channel>
</rss>

