<?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: Best way to obtain percentage of a single column that can have multiple text values in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Best-way-to-obtain-percentage-of-a-single-column-that-can-have/m-p/4007940#M157163</link>
    <description>&lt;P&gt;Hi &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="764978" data-lia-user-login="Dali7" class="lia-mention lia-mention-user"&gt;Dali7&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;From the screenshot you provided, the % of KB entry result is intuitively represented as [Count of KB entries] divided by [Count of Blank], which is available in Power BI using the DIVIDE function.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Create a measure:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;% of KB entry= DIVIDE(MAX('Table'[Count of KB entry]), MAX('Table'[Count of Blank]), 0)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Compared to counting columns, measure performs better because it doesn't take up memory.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this syntax doesn't help you out, I would be grateful if you could provide me with the pbix file or sample data.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Remember to remove sensitive data and do not log in to your account in Power BI Desktop when uploading the pbix file.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you have any other questions please feel free to contact me.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Yang&lt;BR /&gt;Community Support Team&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If there is any post&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;helps&lt;/EM&gt;&lt;/STRONG&gt;, then please consider&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;Accept it as the solution&lt;/EM&gt;&lt;/STRONG&gt;&amp;nbsp;&amp;nbsp;to help the other members find it more quickly.&lt;BR /&gt;If I misunderstand your needs or you still have problems on it, please feel free to let us know.&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;Thanks a lot!&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 25 Jun 2024 01:37:28 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2024-06-25T01:37:28Z</dc:date>
    <item>
      <title>Best way to obtain percentage of a single column that can have multiple text values</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Best-way-to-obtain-percentage-of-a-single-column-that-can-have/m-p/4006952#M157008</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am seeking advice for a basic subject so I do apologise, I have a table that has a list of Users and the results of whether they have looked up a Knowledge Article.&amp;nbsp; The result will either be a Knowledge ref no. or a BLANK. I've been able to create 2 visualisations each with a different filter that provdes the results which is useful. However I can't identify a way to obtain a % from these two figures. Wasn't sure whether I need to create a new column in my table but I'm sure there is an easier way. To help explain I have included below an example of the raw data on the left and how it appears in excel. Basically I am trying to duplicate the pivot table I have in excel on the right in Power BI.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 24 Jun 2024 13:02:22 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Best-way-to-obtain-percentage-of-a-single-column-that-can-have/m-p/4006952#M157008</guid>
      <dc:creator>Dali7</dc:creator>
      <dc:date>2024-06-24T13:02:22Z</dc:date>
    </item>
    <item>
      <title>Re: Best way to obtain percentage of a single column that can have multiple text values</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Best-way-to-obtain-percentage-of-a-single-column-that-can-have/m-p/4007940#M157163</link>
      <description>&lt;P&gt;Hi &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="764978" data-lia-user-login="Dali7" class="lia-mention lia-mention-user"&gt;Dali7&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;From the screenshot you provided, the % of KB entry result is intuitively represented as [Count of KB entries] divided by [Count of Blank], which is available in Power BI using the DIVIDE function.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Create a measure:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;% of KB entry= DIVIDE(MAX('Table'[Count of KB entry]), MAX('Table'[Count of Blank]), 0)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Compared to counting columns, measure performs better because it doesn't take up memory.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this syntax doesn't help you out, I would be grateful if you could provide me with the pbix file or sample data.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Remember to remove sensitive data and do not log in to your account in Power BI Desktop when uploading the pbix file.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you have any other questions please feel free to contact me.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Yang&lt;BR /&gt;Community Support Team&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If there is any post&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;helps&lt;/EM&gt;&lt;/STRONG&gt;, then please consider&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;Accept it as the solution&lt;/EM&gt;&lt;/STRONG&gt;&amp;nbsp;&amp;nbsp;to help the other members find it more quickly.&lt;BR /&gt;If I misunderstand your needs or you still have problems on it, please feel free to let us know.&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;Thanks a lot!&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jun 2024 01:37:28 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Best-way-to-obtain-percentage-of-a-single-column-that-can-have/m-p/4007940#M157163</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-06-25T01:37:28Z</dc:date>
    </item>
    <item>
      <title>Re: Best way to obtain percentage of a single column that can have multiple text values</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Best-way-to-obtain-percentage-of-a-single-column-that-can-have/m-p/4008485#M157375</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you so much Yang for taking the time to provide a solution, I've been thinking about the answer and I fear I haven't clarified the original data based on the solution provided. Looking at the solution this infers there are 2 columns count of KB entry and count of blank but there is only 1 column in the data on the LHS stated Knowledge Article. Looking at that single column I need to use your solution but based on the cells that contain any text containing KB* and any cells that are blank against each User.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Would I need to create 2 measures first:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&amp;nbsp;a measure that counts the cells in Knowledge Article column for that User that contain KB&amp;nbsp;&lt;/LI&gt;&lt;LI&gt;a measure that counts the cells in Knowledge Article column for that User that are BLANK&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;I was able to create a measure but it provided a total of the two variables above rather than a total for each User using the following measures for they only provide a total for the enitre single column:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;KB Total of KB entries = count('Data Apr'[Knowledge Article])&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;KB Field empty = COUNTBLANK('Data Apr'[Knowledge Article])&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Once I have those two measures can I then use your original solution to run a calulation on those measures rather than the solution that perfroms a calculation based on 2 columns, would that work?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any further help with this would be very much appreciated this is my first report.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jun 2024 07:30:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Best-way-to-obtain-percentage-of-a-single-column-that-can-have/m-p/4008485#M157375</guid>
      <dc:creator>Dali7</dc:creator>
      <dc:date>2024-06-25T07:30:44Z</dc:date>
    </item>
    <item>
      <title>Re: Best way to obtain percentage of a single column that can have multiple text values</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Best-way-to-obtain-percentage-of-a-single-column-that-can-have/m-p/4019600#M158568</link>
      <description>&lt;P&gt;Hi &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="764978" data-lia-user-login="Dali7" class="lia-mention lia-mention-user"&gt;Dali7&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Yes, you can certainly do that. Here's a simple example I created based on your needs:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;First, here's the sample data I created.&lt;/P&gt;
&lt;TABLE&gt;
&lt;THEAD&gt;
&lt;TR&gt;
&lt;TD&gt;
&lt;P&gt;&lt;STRONG&gt;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t;
&lt;P&gt;User4&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;KB1003&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;
&lt;P&gt;User5&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;KB1004&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I created a calculated column to identify the categories:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Type = IF('Table'[Konwledge] = BLANK(),"Blank","KB Entry")&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I created 3 measures to count:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Count of Blank = CALCULATE(COUNTROWS('Table'),FILTER(ALLEXCEPT('Table','Table'[User]),'Table'[Type] = "Blank"))

Count of KB Entry = CALCULATE(COUNTROWS('Table'),FILTER(ALLEXCEPT('Table','Table'[User]),'Table'[Type] = "KB Entry"))

Total = CALCULATE(COUNTROWS('Table'),ALLEXCEPT('Table','Table'[User]))&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Finally, calculate the percentage:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;% of KB entry = FORMAT(DIVIDE('Table'[Count of KB Entry],'Table'[Total]),"Percent")&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Using the matrix visual object, it is displayed as follows:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you have any other questions please feel free to contact me.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The pbix file is attached.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Yang&lt;BR /&gt;Community Support Team&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If there is any post&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;helps&lt;/EM&gt;&lt;/STRONG&gt;, then please consider&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;Accept it as the solution&lt;/EM&gt;&lt;/STRONG&gt;&amp;nbsp;&amp;nbsp;to help the other members find it more quickly.&lt;BR /&gt;If I misunderstand your needs or you still have problems on it, please feel free to let us know.&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;Thanks a lot!&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jul 2024 04:21:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Best-way-to-obtain-percentage-of-a-single-column-that-can-have/m-p/4019600#M158568</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-07-02T04:21:36Z</dc:date>
    </item>
    <item>
      <title>Re: Best way to obtain percentage of a single column that can have multiple text values</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Best-way-to-obtain-percentage-of-a-single-column-that-can-have/m-p/4019955#M158582</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hi&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/667910" target="_blank"&gt;@v-huijiey-msft&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks so much for taking the time to reply, that is exactly what I was looking for and works perfectly. Also I can use this methodology for my other reports. Thanks again for all yout help&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jul 2024 07:41:31 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Best-way-to-obtain-percentage-of-a-single-column-that-can-have/m-p/4019955#M158582</guid>
      <dc:creator>Dali7</dc:creator>
      <dc:date>2024-07-02T07:41:31Z</dc:date>
    </item>
  </channel>
</rss>

