<?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: Count of invoices below threshold DAX in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-of-invoices-below-threshold-DAX/m-p/4393613#M174417</link>
    <description>&lt;P&gt;I was able to get desired result from below DAX:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Invoice Count Below threshold = 
			SUMX(
				Daily_invioces,
                VAR CurrentInvoiceAmount = [Inv. Amt SAR]
                VAR ThresholdValue =
                CALCULATE(
                    MAX(Matrix_Invoice_Value[Value]),
                    TREATAS(
                        VALUES(Route_Master[Country]),
                        Matrix_Invoice_Value[Country]
                    ),
                    TREATAS(
                        VALUES(Customer_Master[Trade Category]),
                        Matrix_Invoice_Value[Customer Type]
                    ),
                    TREATAS(
                        VALUES(Route_Master[Route Type3]),
                        Matrix_Invoice_Value[Route Type3]
                    ),
                    TREATAS(
                        VALUES(Route_Cat[Attribute]),
                        Matrix_Invoice_Value[Attribute]
                    )
                )
				RETURN IF(AND(
						NOT (ISBLANK(ThresholdValue)),
						CurrentInvoiceAmount &amp;lt; ThresholdValue
					),1
				)
			)&lt;/LI-CODE&gt;</description>
    <pubDate>Tue, 04 Feb 2025 06:53:19 GMT</pubDate>
    <dc:creator>adsam</dc:creator>
    <dc:date>2025-02-04T06:53:19Z</dc:date>
    <item>
      <title>Count of invoices below threshold DAX</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-of-invoices-below-threshold-DAX/m-p/4386340#M174129</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I m trying to create a measure to count number of invoices below threshold, threshold table is defined as below.&amp;nbsp;&lt;/P&gt;&lt;P&gt;my measure is working somehow but not giving total number of invoices, there is something wrong.&lt;/P&gt;&lt;P&gt;kindly need assistance.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://drive.google.com/file/d/1h9iXOVV159-1B39-4vzebiwTmlAnPLS4/view?usp=sharing" target="_self"&gt;Filelink&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Invoice Count Below threshold = VAR CurrentInvoiceAmount = [Inv. Amt SAR]
		VAR ThresholdValue =
		CALCULATE(
			MAX(Matrix_Invoice_Value[Value]),
			TREATAS(
				VALUES(Route_Master[Country]),
				Matrix_Invoice_Value[Country]
			),
			TREATAS(
				VALUES(Customer_Master[Trade Category]),
				Matrix_Invoice_Value[Customer Type]
			),
			TREATAS(
				VALUES(Route_Master[Route Type3]),
				Matrix_Invoice_Value[Route Type3]
			),
			TREATAS(
				VALUES(Route_Cat[Attribute]),
				Matrix_Invoice_Value[Attribute]
			)
		)
		RETURN
			CALCULATE(
				[Invoice Count],
				FILTER(
					Daily_invioces,
					AND(
						NOT (ISBLANK(ThresholdValue)),
						CurrentInvoiceAmount &amp;lt; ThresholdValue
					)
				)
			)
	&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;threshold table&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Measure result:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Data model&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 29 Jan 2025 14:16:38 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-of-invoices-below-threshold-DAX/m-p/4386340#M174129</guid>
      <dc:creator>adsam</dc:creator>
      <dc:date>2025-01-29T14:16:38Z</dc:date>
    </item>
    <item>
      <title>Re: Count of invoices below threshold DAX</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-of-invoices-below-threshold-DAX/m-p/4386392#M174130</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="285359" data-lia-user-login="adsam" class="lia-mention lia-mention-user"&gt;adsam&lt;/a&gt;&amp;nbsp;First, please vote for this idea: &lt;A href="https://ideas.powerbi.com/ideas/idea/?ideaid=082203f1-594f-4ba7-ac87-bb91096c742e" target="_blank"&gt;https://ideas.powerbi.com/ideas/idea/?ideaid=082203f1-594f-4ba7-ac87-bb91096c742e&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;This looks like a measure totals problem. Very common. See my post about it here: &lt;A href="https://community.powerbi.com/t5/DAX-Commands-and-Tips/Dealing-with-Measure-Totals/td-p/63376" target="_blank"&gt;https://community.powerbi.com/t5/DAX-Commands-and-Tips/Dealing-with-Measure-Totals/td-p/63376&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Also, this Quick Measure, Measure Totals, The Final Word should get you what you need:&lt;BR /&gt;&lt;A href="https://community.powerbi.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/m-p/547907" target="_blank"&gt;https://community.powerbi.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/m-p/547907&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Also: &lt;A href="https://youtu.be/uXRriTN0cfY" target="_blank"&gt;https://youtu.be/uXRriTN0cfY&lt;/A&gt;&lt;BR /&gt;And: &lt;A href="https://youtu.be/n4TYhF2ARe8" target="_blank"&gt;https://youtu.be/n4TYhF2ARe8&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 29 Jan 2025 14:45:58 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-of-invoices-below-threshold-DAX/m-p/4386392#M174130</guid>
      <dc:creator>Greg_Deckler</dc:creator>
      <dc:date>2025-01-29T14:45:58Z</dc:date>
    </item>
    <item>
      <title>Re: Count of invoices below threshold DAX</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-of-invoices-below-threshold-DAX/m-p/4387391#M174168</link>
      <description>&lt;P&gt;it didn't solve my problem, I think we need to use iterator function, which will scan all "daily invoice" table and count invoices which are below criteria mentioned in threshold table. Please help.&lt;/P&gt;</description>
      <pubDate>Thu, 30 Jan 2025 05:49:38 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-of-invoices-below-threshold-DAX/m-p/4387391#M174168</guid>
      <dc:creator>adsam</dc:creator>
      <dc:date>2025-01-30T05:49:38Z</dc:date>
    </item>
    <item>
      <title>Re: Count of invoices below threshold DAX</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-of-invoices-below-threshold-DAX/m-p/4393613#M174417</link>
      <description>&lt;P&gt;I was able to get desired result from below DAX:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Invoice Count Below threshold = 
			SUMX(
				Daily_invioces,
                VAR CurrentInvoiceAmount = [Inv. Amt SAR]
                VAR ThresholdValue =
                CALCULATE(
                    MAX(Matrix_Invoice_Value[Value]),
                    TREATAS(
                        VALUES(Route_Master[Country]),
                        Matrix_Invoice_Value[Country]
                    ),
                    TREATAS(
                        VALUES(Customer_Master[Trade Category]),
                        Matrix_Invoice_Value[Customer Type]
                    ),
                    TREATAS(
                        VALUES(Route_Master[Route Type3]),
                        Matrix_Invoice_Value[Route Type3]
                    ),
                    TREATAS(
                        VALUES(Route_Cat[Attribute]),
                        Matrix_Invoice_Value[Attribute]
                    )
                )
				RETURN IF(AND(
						NOT (ISBLANK(ThresholdValue)),
						CurrentInvoiceAmount &amp;lt; ThresholdValue
					),1
				)
			)&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 04 Feb 2025 06:53:19 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-of-invoices-below-threshold-DAX/m-p/4393613#M174417</guid>
      <dc:creator>adsam</dc:creator>
      <dc:date>2025-02-04T06:53:19Z</dc:date>
    </item>
  </channel>
</rss>

