<?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 I need a DAX expression for ...where values of all related rows are true in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/I-need-a-DAX-expression-for-where-values-of-all-related-rows-are/m-p/2388437#M62003</link>
    <description>&lt;P&gt;Hi Everybody,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a problem with my DAX to create a measure that gives me some information about the type of an order.&lt;/P&gt;&lt;P&gt;I tried already different versions (even calculated columns) but do not get the right values.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope someone can give me a hint.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My scenario:&lt;/P&gt;&lt;P&gt;I want to identify within all my orders: how many of these orders are 'sample orders',&amp;nbsp; how many are 'normal/full orders' and how many are a combination of both (order does contain positions that would qualify as a sample, but also positions that qualify as full)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a fact table that contains all my order rows (order position of each order of each customer).&lt;/P&gt;&lt;P&gt;My order lines/positions have a 'quantity' field, that shows me how much of one article was ordered.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I define via a calculated column, if a row qualifies as 'sample position' (IsSample=&lt;SPAN&gt;IF&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;order_lines[quantity]&lt;/SPAN&gt;&lt;SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN&gt;3&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;TRUE&lt;/SPAN&gt;&lt;SPAN&gt;(), &lt;/SPAN&gt;&lt;SPAN&gt;FALSE&lt;/SPAN&gt;&lt;SPAN&gt;()))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;To get 'Amount of Sample orders' I wanted to DISTINCTCOUNT the order-no of all rows where this is true&lt;BR /&gt;I used:&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Amount Sample Orders = &lt;/SPAN&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;DISTINCTCOUNT&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;order_lines[order-no]&lt;/SPAN&gt;&lt;SPAN&gt;), &lt;/SPAN&gt;&lt;SPAN&gt;KEEPFILTERS&lt;/SPAN&gt;&lt;SPAN&gt;( &lt;/SPAN&gt;&lt;SPAN&gt;order_lines[IsSample]&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;TRUE&lt;/SPAN&gt;&lt;SPAN&gt;()))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;- but this is wrong as it would give me also the orders that qualify as a combination. (orders that have at least one position where the statement is true)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;So I need to check for all order_lines if this statement is true. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;(And then I would do the same other way araound: all orders where for all order_lines the statement is False, to get all normal/full orders. And then I would calculate the combination-orders (mixture of both) by Counting all orders and subtracting my sample-orders and my normal-orders. )&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then I tried this:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;To find out how many orders only contain order-lines where the statement is true, I separated the order-no. in a new table and linked my new 'order_header' table to 'order_lines' via the order_no as a key. The relation is: one order_header can have several order_lines, but one order_line can only link to one order_header. The relation dows work fine (tested it via visuals)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Now I try to do it like I would do it with a SQL JOIN - assuming that the relation between those two tables are enough and would use this DAX:&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Amount of Sample Orders = &lt;/SPAN&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;DISTINCTCOUNT&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;order_header[order-no]&lt;/SPAN&gt;&lt;SPAN&gt;), &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;KEEPFILTERS&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;order_lines[IsSample]&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;TRUE&lt;/SPAN&gt;&lt;SPAN&gt;()))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;this seems working better, as I get a result - but I get the same value for each customer, when I use it in a visual:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So I have the feeling I am close to the solution.&lt;BR /&gt;I thought the same value in each field is a problem that I would avoid with 'KEEPFILTERS', but seems not to be the problem here.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I already tried Versions of the above with 'FILTER' instead of 'KEEPFILTERS' and I also mixed in a RELATED() ... but nothing helped.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Am I totally wrong with my approach and the solution would be something completely different?&lt;/P&gt;&lt;P&gt;Should I go with a CROSSJOIN or HASVALUE function to solve such a problem?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope someone has an idea and could point me in a new direction.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 11 Mar 2022 10:38:49 GMT</pubDate>
    <dc:creator>backflash</dc:creator>
    <dc:date>2022-03-11T10:38:49Z</dc:date>
    <item>
      <title>I need a DAX expression for ...where values of all related rows are true</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/I-need-a-DAX-expression-for-where-values-of-all-related-rows-are/m-p/2388437#M62003</link>
      <description>&lt;P&gt;Hi Everybody,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a problem with my DAX to create a measure that gives me some information about the type of an order.&lt;/P&gt;&lt;P&gt;I tried already different versions (even calculated columns) but do not get the right values.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope someone can give me a hint.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My scenario:&lt;/P&gt;&lt;P&gt;I want to identify within all my orders: how many of these orders are 'sample orders',&amp;nbsp; how many are 'normal/full orders' and how many are a combination of both (order does contain positions that would qualify as a sample, but also positions that qualify as full)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a fact table that contains all my order rows (order position of each order of each customer).&lt;/P&gt;&lt;P&gt;My order lines/positions have a 'quantity' field, that shows me how much of one article was ordered.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I define via a calculated column, if a row qualifies as 'sample position' (IsSample=&lt;SPAN&gt;IF&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;order_lines[quantity]&lt;/SPAN&gt;&lt;SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN&gt;3&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;TRUE&lt;/SPAN&gt;&lt;SPAN&gt;(), &lt;/SPAN&gt;&lt;SPAN&gt;FALSE&lt;/SPAN&gt;&lt;SPAN&gt;()))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;To get 'Amount of Sample orders' I wanted to DISTINCTCOUNT the order-no of all rows where this is true&lt;BR /&gt;I used:&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Amount Sample Orders = &lt;/SPAN&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;DISTINCTCOUNT&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;order_lines[order-no]&lt;/SPAN&gt;&lt;SPAN&gt;), &lt;/SPAN&gt;&lt;SPAN&gt;KEEPFILTERS&lt;/SPAN&gt;&lt;SPAN&gt;( &lt;/SPAN&gt;&lt;SPAN&gt;order_lines[IsSample]&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;TRUE&lt;/SPAN&gt;&lt;SPAN&gt;()))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;- but this is wrong as it would give me also the orders that qualify as a combination. (orders that have at least one position where the statement is true)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;So I need to check for all order_lines if this statement is true. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;(And then I would do the same other way araound: all orders where for all order_lines the statement is False, to get all normal/full orders. And then I would calculate the combination-orders (mixture of both) by Counting all orders and subtracting my sample-orders and my normal-orders. )&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then I tried this:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;To find out how many orders only contain order-lines where the statement is true, I separated the order-no. in a new table and linked my new 'order_header' table to 'order_lines' via the order_no as a key. The relation is: one order_header can have several order_lines, but one order_line can only link to one order_header. The relation dows work fine (tested it via visuals)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Now I try to do it like I would do it with a SQL JOIN - assuming that the relation between those two tables are enough and would use this DAX:&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Amount of Sample Orders = &lt;/SPAN&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;DISTINCTCOUNT&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;order_header[order-no]&lt;/SPAN&gt;&lt;SPAN&gt;), &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;KEEPFILTERS&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;order_lines[IsSample]&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;TRUE&lt;/SPAN&gt;&lt;SPAN&gt;()))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;this seems working better, as I get a result - but I get the same value for each customer, when I use it in a visual:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So I have the feeling I am close to the solution.&lt;BR /&gt;I thought the same value in each field is a problem that I would avoid with 'KEEPFILTERS', but seems not to be the problem here.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I already tried Versions of the above with 'FILTER' instead of 'KEEPFILTERS' and I also mixed in a RELATED() ... but nothing helped.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Am I totally wrong with my approach and the solution would be something completely different?&lt;/P&gt;&lt;P&gt;Should I go with a CROSSJOIN or HASVALUE function to solve such a problem?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope someone has an idea and could point me in a new direction.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 11 Mar 2022 10:38:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/I-need-a-DAX-expression-for-where-values-of-all-related-rows-are/m-p/2388437#M62003</guid>
      <dc:creator>backflash</dc:creator>
      <dc:date>2022-03-11T10:38:49Z</dc:date>
    </item>
    <item>
      <title>Re: I need a DAX expression for ...where values of all related rows are true</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/I-need-a-DAX-expression-for-where-values-of-all-related-rows-are/m-p/2388712#M62019</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="348184" data-lia-user-login="backflash" class="lia-mention lia-mention-user"&gt;backflash&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;you start with creating a calculated column&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;Order Type =
VAR T1 =
    CALCULATETABLE (
        'order_lines',
        ALLEXCEPT ( 'order_lines', 'order_lines'[order-no] )
    )
VAR MaxQty =
    MAXX ( 'T1', 'order_lines'[Quantity] )
VAR MinQty =
    MINX ( 'T1', 'order_lines'[Quantity] )
VAR Result =
    IF (
        MaxQty &amp;lt; 3,
        "Sample Order",
        IF ( MinQty &amp;lt; 3, "Mixed Order", "Normal Order" )
    )
RETURN
    Result&lt;/LI-CODE&gt;&lt;P&gt;you measure would be only&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;Number of Orders =
DISTINCTCOUNT ( 'order_lines'[order-no] )&lt;/LI-CODE&gt;&lt;P&gt;Add the new column to the columns of the matix visual and the measure to the values.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 11 Mar 2022 13:09:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/I-need-a-DAX-expression-for-where-values-of-all-related-rows-are/m-p/2388712#M62019</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-03-11T13:09:44Z</dc:date>
    </item>
    <item>
      <title>Re: I need a DAX expression for ...where values of all related rows are true</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/I-need-a-DAX-expression-for-where-values-of-all-related-rows-are/m-p/2388773#M62021</link>
      <description>&lt;P&gt;Hi &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="317289" data-lia-user-login="tamerj1" class="lia-mention lia-mention-user"&gt;tamerj1&lt;/a&gt; ,&lt;/P&gt;&lt;P&gt;many thanks for your suggestion.&lt;/P&gt;&lt;P&gt;Sadly I do only see 'Mixed order' as values in my newly created columns. There are no 'sample orders' or 'normal orders' with the code you provided.&lt;/P&gt;&lt;P&gt;I guess it is in the Result part, where something whould be different.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;I do not understand fully what happens when you use 'MAXX' and 'MINX' for the order-lines-quantities. Don't you aggregate them that way?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 11 Mar 2022 13:46:47 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/I-need-a-DAX-expression-for-where-values-of-all-related-rows-are/m-p/2388773#M62021</guid>
      <dc:creator>backflash</dc:creator>
      <dc:date>2022-03-11T13:46:47Z</dc:date>
    </item>
    <item>
      <title>Re: I need a DAX expression for ...where values of all related rows are true</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/I-need-a-DAX-expression-for-where-values-of-all-related-rows-are/m-p/2388828#M62029</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="348184" data-lia-user-login="backflash" class="lia-mention lia-mention-user"&gt;backflash&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;per each order number, MAXX will return the maximum quantity and MINX will return the minumum quantity. If the maximum order quantity is less than three then all the order quantities are less than 3 therfore the first IF statment returns "Simple Order" otherise the nested IF statement checks if the minimum quantity is greater than 3 (and here is the error in the code) then it shall return " Normal Order" otherwise it returns "Mixed Order"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;Order Type =
VAR T1 =
    CALCULATETABLE (
        'order_lines',
        ALLEXCEPT ( 'order_lines', 'order_lines'[order-no] )
    )
VAR MaxQty =
    MAXX ( 'T1', 'order_lines'[Quantity] )
VAR MinQty =
    MINX ( 'T1', 'order_lines'[Quantity] )
VAR Result =
    IF (
        MaxQty &amp;lt; 3,
        "Sample Order",
        IF ( MinQty &amp;gt;= 3, "Normal Order", "Mixed Order" )
    )
RETURN
    Result&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 11 Mar 2022 14:19:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/I-need-a-DAX-expression-for-where-values-of-all-related-rows-are/m-p/2388828#M62029</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-03-11T14:19:49Z</dc:date>
    </item>
    <item>
      <title>Re: I need a DAX expression for ...where values of all related rows are true</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/I-need-a-DAX-expression-for-where-values-of-all-related-rows-are/m-p/2391305#M62209</link>
      <description>&lt;P&gt;Hi &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="317289" data-lia-user-login="tamerj1" class="lia-mention lia-mention-user"&gt;tamerj1&lt;/a&gt; ,&lt;/P&gt;&lt;P&gt;thanks for the explanation. Now I got the reason behind it. A nice way to do it!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But sadly it does not work, even when I correct the calculation ('&amp;gt;=' instead of '&amp;lt;' in the second IF clause).&lt;BR /&gt;Before correcting this error, it gave me 'Normal ordera' for all 35.000 orders - now with corrected option it gives me 'mixed order' for all the orders.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If it gives me 'Mixed order', that means that MaxQty is always smaller than 3 and MinQty is always bigger than 3 ... which is strange, because that's definitively not the case.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could it be that by grouping all orderlines by order-no (which CALCULATETABLE does, right?) , he is summarizing all the order-line quantities and therefor does no longer see a Minquantity lower dann 3?&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have the feeling we are so close &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Thanks for yor support! Really appreciate!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 14 Mar 2022 06:49:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/I-need-a-DAX-expression-for-where-values-of-all-related-rows-are/m-p/2391305#M62209</guid>
      <dc:creator>backflash</dc:creator>
      <dc:date>2022-03-14T06:49:26Z</dc:date>
    </item>
    <item>
      <title>Re: I need a DAX expression for ...where values of all related rows are true</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/I-need-a-DAX-expression-for-where-values-of-all-related-rows-are/m-p/2391337#M62211</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="348184" data-lia-user-login="backflash" class="lia-mention lia-mention-user"&gt;backflash&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;This was not the only change in the code. Did you also switched between "Normal Order" and "Mixed Order" in the IF statement?&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;    IF (
        MaxQty &amp;lt; 3,
        "Sample Order",
        IF ( MinQty &amp;gt;= 3, "Normal Order", "Mixed Order" )
    )&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 14 Mar 2022 07:02:51 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/I-need-a-DAX-expression-for-where-values-of-all-related-rows-are/m-p/2391337#M62211</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-03-14T07:02:51Z</dc:date>
    </item>
    <item>
      <title>Re: I need a DAX expression for ...where values of all related rows are true</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/I-need-a-DAX-expression-for-where-values-of-all-related-rows-are/m-p/2391620#M62224</link>
      <description>&lt;P&gt;Hi &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="317289" data-lia-user-login="tamerj1" class="lia-mention lia-mention-user"&gt;tamerj1&lt;/a&gt; ,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;yes, I changed this as well.&lt;/P&gt;&lt;P&gt;And as it always gives me 'Mixed order' for all orders, I assume that it is doing the else case in both IF clauses which would mean neither is Max-Quantity smaller 3 nor is Min-Quantity bigger than or equal to 3 - which does not make any sense, or?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 14 Mar 2022 08:27:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/I-need-a-DAX-expression-for-where-values-of-all-related-rows-are/m-p/2391620#M62224</guid>
      <dc:creator>backflash</dc:creator>
      <dc:date>2022-03-14T08:27:44Z</dc:date>
    </item>
    <item>
      <title>Re: I need a DAX expression for ...where values of all related rows are true</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/I-need-a-DAX-expression-for-where-values-of-all-related-rows-are/m-p/2391745#M62227</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="348184" data-lia-user-login="backflash" class="lia-mention lia-mention-user"&gt;backflash&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Would you please double check the data type of the QTY column. It should be of Integer&amp;nbsp;type. Please also check the same in the Power Query Editor (make sure it is Whole Number)&lt;/P&gt;</description>
      <pubDate>Mon, 14 Mar 2022 08:56:19 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/I-need-a-DAX-expression-for-where-values-of-all-related-rows-are/m-p/2391745#M62227</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-03-14T08:56:19Z</dc:date>
    </item>
    <item>
      <title>Re: I need a DAX expression for ...where values of all related rows are true</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/I-need-a-DAX-expression-for-where-values-of-all-related-rows-are/m-p/2391771#M62228</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="348184" data-lia-user-login="backflash" class="lia-mention lia-mention-user"&gt;backflash&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;After confirming the data type please change the RETURN expreession for debugging puposses:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;RETURN
    RCOUNTROWS ( 'order_lines' )&lt;/LI-CODE&gt;&lt;LI-CODE lang="javascript"&gt;RETURN
    MaxQty&lt;/LI-CODE&gt;&lt;LI-CODE lang="javascript"&gt;RETURN
    MinQty&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please check if anything wrong with the resulted values and let me know. Thank you&lt;/P&gt;</description>
      <pubDate>Mon, 14 Mar 2022 09:04:42 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/I-need-a-DAX-expression-for-where-values-of-all-related-rows-are/m-p/2391771#M62228</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-03-14T09:04:42Z</dc:date>
    </item>
    <item>
      <title>Re: I need a DAX expression for ...where values of all related rows are true</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/I-need-a-DAX-expression-for-where-values-of-all-related-rows-are/m-p/2391913#M62235</link>
      <description>&lt;P&gt;Hi &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="317289" data-lia-user-login="tamerj1" class="lia-mention lia-mention-user"&gt;tamerj1&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;all values returned are correct.&lt;/P&gt;&lt;P&gt;COUNTROWS(order_lines): 84.377 --&amp;gt; which is correct&lt;/P&gt;&lt;P&gt;MaxQty: 6200 --&amp;gt; which is really the highest quantity-value of all order-lines&lt;/P&gt;&lt;P&gt;MinQty: 0 --&amp;gt; which is also correct, because we have some 0-quantity order-lines due to the way the webshop funtioned in the past.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Not sure if this caused the trouble, I removed all the 0-quantity order-lines,and now I get for&lt;/P&gt;&lt;P&gt;return MinQty: 1 --&amp;gt; which is correct&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but still:&lt;BR /&gt;All orders are set as 'Mixed orders'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But all values (distinctcount of order-no, MinQuantity and MaxQuantity overall) are correct!&lt;/P&gt;&lt;P&gt;But the values were not grouped by the order-no - but instead was the min and max quantity from all order lines that are avaialble.&lt;/P&gt;&lt;P&gt;So it might be the missing grouping by order-no?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 14 Mar 2022 09:40:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/I-need-a-DAX-expression-for-where-values-of-all-related-rows-are/m-p/2391913#M62235</guid>
      <dc:creator>backflash</dc:creator>
      <dc:date>2022-03-14T09:40:24Z</dc:date>
    </item>
    <item>
      <title>Re: I need a DAX expression for ...where values of all related rows are true</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/I-need-a-DAX-expression-for-where-values-of-all-related-rows-are/m-p/2391926#M62236</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="317289" data-lia-user-login="tamerj1" class="lia-mention lia-mention-user"&gt;tamerj1&lt;/a&gt;I created a new table with&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;NewTable = 
CALCULATETABLE (
        'order_lines',
        ALLEXCEPT ( 'order_lines', 'order_lines'[order-no] )&lt;/LI-CODE&gt;&lt;P&gt;And I can see that the order-no are still multiple avaialble in each row. So that means it is not grouped by order-no, right?&lt;/P&gt;</description>
      <pubDate>Mon, 14 Mar 2022 09:43:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/I-need-a-DAX-expression-for-where-values-of-all-related-rows-are/m-p/2391926#M62236</guid>
      <dc:creator>backflash</dc:creator>
      <dc:date>2022-03-14T09:43:54Z</dc:date>
    </item>
    <item>
      <title>Re: I need a DAX expression for ...where values of all related rows are true</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/I-need-a-DAX-expression-for-where-values-of-all-related-rows-are/m-p/2391957#M62241</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="348184" data-lia-user-login="backflash" class="lia-mention lia-mention-user"&gt;backflash&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Yes that is strange. However try to replace with this code&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;Order Type =
VAR T1 =
    FILTER (
        'order_lines',
        'order_lines'[order-no] = EARLIER ( 'order_lines'[order-no] )
    )
VAR MaxQty =
    MAXX ( 'T1', 'order_lines'[Quantity] )
VAR MinQty =
    MINX ( 'T1', 'order_lines'[Quantity] )
VAR Result =
    IF (
        MaxQty &amp;lt; 3,
        "Sample Order",
        IF ( MinQty &amp;gt;= 3, "Normal Order", "Mixed Order" )
    )
RETURN
    Result&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 14 Mar 2022 09:54:35 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/I-need-a-DAX-expression-for-where-values-of-all-related-rows-are/m-p/2391957#M62241</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-03-14T09:54:35Z</dc:date>
    </item>
    <item>
      <title>Re: I need a DAX expression for ...where values of all related rows are true</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/I-need-a-DAX-expression-for-where-values-of-all-related-rows-are/m-p/2391963#M62242</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="317289" data-lia-user-login="tamerj1" class="lia-mention lia-mention-user"&gt;tamerj1&lt;/a&gt;it is WholeNumber in QueryEditor and is presented as WholeNumber in data view:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 14 Mar 2022 09:56:56 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/I-need-a-DAX-expression-for-where-values-of-all-related-rows-are/m-p/2391963#M62242</guid>
      <dc:creator>backflash</dc:creator>
      <dc:date>2022-03-14T09:56:56Z</dc:date>
    </item>
    <item>
      <title>Re: I need a DAX expression for ...where values of all related rows are true</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/I-need-a-DAX-expression-for-where-values-of-all-related-rows-are/m-p/2391979#M62243</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="348184" data-lia-user-login="backflash" class="lia-mention lia-mention-user"&gt;backflash&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Did you read my last reply?&lt;/P&gt;</description>
      <pubDate>Mon, 14 Mar 2022 10:05:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/I-need-a-DAX-expression-for-where-values-of-all-related-rows-are/m-p/2391979#M62243</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-03-14T10:05:54Z</dc:date>
    </item>
    <item>
      <title>Re: I need a DAX expression for ...where values of all related rows are true</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/I-need-a-DAX-expression-for-where-values-of-all-related-rows-are/m-p/2392020#M62244</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="317289" data-lia-user-login="tamerj1" class="lia-mention lia-mention-user"&gt;tamerj1&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks for this new option.&lt;/P&gt;&lt;P&gt;But now it says:&lt;/P&gt;&lt;P&gt;A single value for column 'order-no' in table 'order-lines' cannot be determined. This can happen when a measure formula refers to a column that contain many values without specifying an aggregation such as min, max, count or sum to get a single result.&lt;/P&gt;</description>
      <pubDate>Mon, 14 Mar 2022 10:22:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/I-need-a-DAX-expression-for-where-values-of-all-related-rows-are/m-p/2392020#M62244</guid>
      <dc:creator>backflash</dc:creator>
      <dc:date>2022-03-14T10:22:26Z</dc:date>
    </item>
    <item>
      <title>Re: I need a DAX expression for ...where values of all related rows are true</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/I-need-a-DAX-expression-for-where-values-of-all-related-rows-are/m-p/2392031#M62246</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="348184" data-lia-user-login="backflash" class="lia-mention lia-mention-user"&gt;backflash&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Are you creating a calculated column or a measure?&lt;/P&gt;</description>
      <pubDate>Mon, 14 Mar 2022 10:25:13 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/I-need-a-DAX-expression-for-where-values-of-all-related-rows-are/m-p/2392031#M62246</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-03-14T10:25:13Z</dc:date>
    </item>
    <item>
      <title>Re: I need a DAX expression for ...where values of all related rows are true</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/I-need-a-DAX-expression-for-where-values-of-all-related-rows-are/m-p/2392081#M62251</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="317289" data-lia-user-login="tamerj1" class="lia-mention lia-mention-user"&gt;tamerj1&lt;/a&gt;a calculated columns as you suggested in the first version.&lt;/P&gt;&lt;P&gt;should I change this into a measure completely?&lt;/P&gt;</description>
      <pubDate>Mon, 14 Mar 2022 10:38:43 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/I-need-a-DAX-expression-for-where-values-of-all-related-rows-are/m-p/2392081#M62251</guid>
      <dc:creator>backflash</dc:creator>
      <dc:date>2022-03-14T10:38:43Z</dc:date>
    </item>
    <item>
      <title>Re: I need a DAX expression for ...where values of all related rows are true</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/I-need-a-DAX-expression-for-where-values-of-all-related-rows-are/m-p/2392113#M62258</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="317289" data-lia-user-login="tamerj1" class="lia-mention lia-mention-user"&gt;tamerj1&lt;/a&gt;when I change it to a measure it says that my EARLIER refers to an earlier row context that doesn't exist.&lt;/P&gt;&lt;P&gt;Seems to have a problem identifying the correct row to choose.&lt;/P&gt;</description>
      <pubDate>Mon, 14 Mar 2022 10:55:01 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/I-need-a-DAX-expression-for-where-values-of-all-related-rows-are/m-p/2392113#M62258</guid>
      <dc:creator>backflash</dc:creator>
      <dc:date>2022-03-14T10:55:01Z</dc:date>
    </item>
    <item>
      <title>Re: I need a DAX expression for ...where values of all related rows are true</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/I-need-a-DAX-expression-for-where-values-of-all-related-rows-are/m-p/2392117#M62260</link>
      <description>&lt;P&gt;No Just wanted to make sure you are using a calculated column no a measure&lt;/P&gt;</description>
      <pubDate>Mon, 14 Mar 2022 10:56:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/I-need-a-DAX-expression-for-where-values-of-all-related-rows-are/m-p/2392117#M62260</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-03-14T10:56:46Z</dc:date>
    </item>
    <item>
      <title>Re: I need a DAX expression for ...where values of all related rows are true</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/I-need-a-DAX-expression-for-where-values-of-all-related-rows-are/m-p/2392128#M62262</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="348184" data-lia-user-login="backflash" class="lia-mention lia-mention-user"&gt;backflash&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Can you please share sample file?&lt;/P&gt;</description>
      <pubDate>Mon, 14 Mar 2022 11:04:42 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/I-need-a-DAX-expression-for-where-values-of-all-related-rows-are/m-p/2392128#M62262</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-03-14T11:04:42Z</dc:date>
    </item>
  </channel>
</rss>

