<?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 Zero Values For Measure Not Appearing in Matrix Visual in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Zero-Values-For-Measure-Not-Appearing-in-Matrix-Visual/m-p/3180339#M114967</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a data set I am trying to summarize using a measure in a matrix visual.&amp;nbsp; The data is looking at whether certain trains running on time or not, with the data set being records of various trips.&amp;nbsp; Summarizing the count of trips looks like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;On Time&lt;/TD&gt;&lt;TD&gt;Late&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Train A&lt;/TD&gt;&lt;TD&gt;90&lt;/TD&gt;&lt;TD&gt;10&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Train B&lt;/TD&gt;&lt;TD&gt;75&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Train C&lt;/TD&gt;&lt;TD&gt;50&lt;/TD&gt;&lt;TD&gt;50&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I then make use of my measure to summarize the percentage trips that are late, I get this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Train A&lt;/TD&gt;&lt;TD&gt;10%&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Train C&lt;/TD&gt;&lt;TD&gt;50%&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I really want though is for there to also be a 'Train B' row with 0% in there.&amp;nbsp; I assume it's because there are no trips that were late and so I'm getting a blank, but various efforts to make it appear (checking for a blank value, adding a 0 to the measure) aren't doing much for me.&amp;nbsp; The DAX looks like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;% Trips Late = 
    CALCULATE(
        DISTINCTCOUNT('TRAIN_TRIPS'[TRIP_ID]),
        'TRAIN_TRIPS'[LATE_FLAG] = "Late"
    )
    /
    CALCULATE(
        DISTINCTCOUNT('TRAIN_TRIPS'[TRIP_ID]),
        'TRAIN_TRIPS'[LATE_FLAG] IN {"Late", "On Time"}
    )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What do I need to do differently to get the table I need?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your help!&lt;/P&gt;</description>
    <pubDate>Mon, 10 Apr 2023 19:18:30 GMT</pubDate>
    <dc:creator>pbiuser12345</dc:creator>
    <dc:date>2023-04-10T19:18:30Z</dc:date>
    <item>
      <title>Zero Values For Measure Not Appearing in Matrix Visual</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Zero-Values-For-Measure-Not-Appearing-in-Matrix-Visual/m-p/3180339#M114967</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a data set I am trying to summarize using a measure in a matrix visual.&amp;nbsp; The data is looking at whether certain trains running on time or not, with the data set being records of various trips.&amp;nbsp; Summarizing the count of trips looks like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;On Time&lt;/TD&gt;&lt;TD&gt;Late&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Train A&lt;/TD&gt;&lt;TD&gt;90&lt;/TD&gt;&lt;TD&gt;10&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Train B&lt;/TD&gt;&lt;TD&gt;75&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Train C&lt;/TD&gt;&lt;TD&gt;50&lt;/TD&gt;&lt;TD&gt;50&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I then make use of my measure to summarize the percentage trips that are late, I get this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Train A&lt;/TD&gt;&lt;TD&gt;10%&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Train C&lt;/TD&gt;&lt;TD&gt;50%&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I really want though is for there to also be a 'Train B' row with 0% in there.&amp;nbsp; I assume it's because there are no trips that were late and so I'm getting a blank, but various efforts to make it appear (checking for a blank value, adding a 0 to the measure) aren't doing much for me.&amp;nbsp; The DAX looks like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;% Trips Late = 
    CALCULATE(
        DISTINCTCOUNT('TRAIN_TRIPS'[TRIP_ID]),
        'TRAIN_TRIPS'[LATE_FLAG] = "Late"
    )
    /
    CALCULATE(
        DISTINCTCOUNT('TRAIN_TRIPS'[TRIP_ID]),
        'TRAIN_TRIPS'[LATE_FLAG] IN {"Late", "On Time"}
    )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What do I need to do differently to get the table I need?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your help!&lt;/P&gt;</description>
      <pubDate>Mon, 10 Apr 2023 19:18:30 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Zero-Values-For-Measure-Not-Appearing-in-Matrix-Visual/m-p/3180339#M114967</guid>
      <dc:creator>pbiuser12345</dc:creator>
      <dc:date>2023-04-10T19:18:30Z</dc:date>
    </item>
    <item>
      <title>Re: Zero Values For Measure Not Appearing in Matrix Visual</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Zero-Values-For-Measure-Not-Appearing-in-Matrix-Visual/m-p/3180380#M114969</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="353291" data-lia-user-login="pbiuser12345" class="lia-mention lia-mention-user"&gt;pbiuser12345&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;This Solves your problem (need to use DIVIDE function):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;% Trips Late =
DIVIDE (
    CALCULATE (
        DISTINCTCOUNT ( 'TRAIN_TRIPS'[TRIP_ID] ),
        'TRAIN_TRIPS'[LATE_FLAG] = "Late"
    ),
    CALCULATE (
        DISTINCTCOUNT ( 'TRAIN_TRIPS'[TRIP_ID] ),
        'TRAIN_TRIPS'[LATE_FLAG] IN { "Late", "On Time" }
    )
) + 0&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000FF"&gt;If this solves your question, Please give it a thumbs up and accept it as a solution to make it easier for the others to find what they are looking for.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000FF"&gt;Regards,&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;Loran&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Apr 2023 19:48:32 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Zero-Values-For-Measure-Not-Appearing-in-Matrix-Visual/m-p/3180380#M114969</guid>
      <dc:creator>MohammadLoran25</dc:creator>
      <dc:date>2023-04-10T19:48:32Z</dc:date>
    </item>
  </channel>
</rss>

