<?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 Filtering a cloumn with text in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filtering-a-cloumn-with-text/m-p/902340#M8288</link>
    <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Pleas can someone help with this.&amp;nbsp; I have searched and cant find the answer to my question(s).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How to filter a column with text only without using the page or visual filters.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am creating a report that shows how many sales have been made by source.&amp;nbsp; We have many online platforms and this leads me onto my next question.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What i was hoping to do was to filter by source.&amp;nbsp; Then each of the sources has their own fees to take into account.&amp;nbsp; Over all i am wanting to be able to create a report that does the following.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Calculates totals by source.&lt;/P&gt;&lt;P&gt;deduct the differnt fees per source to provide an exact profit report.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Exaple&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Source 1, base fee 0.30p per transaction, 12% of total order.&lt;/P&gt;&lt;P&gt;Source 2, base fee 0.30p per transaction, 5% of total order.&lt;/P&gt;&lt;P&gt;Source 3, base fee 0.30p per transaction, 7% of total order.&lt;/P&gt;&lt;P&gt;Source 4, base fee 0.00p per transaction, 20% of total order.&lt;/P&gt;&lt;P&gt;Source 5, base fee,&amp;nbsp; 15% of total order. or £1 depending what value is more&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a calender table and date table. with most of the measures as i am 80 %complete just need this part answering.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many thanks&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ben&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 16 Jan 2020 15:33:42 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2020-01-16T15:33:42Z</dc:date>
    <item>
      <title>Filtering a cloumn with text</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filtering-a-cloumn-with-text/m-p/902340#M8288</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Pleas can someone help with this.&amp;nbsp; I have searched and cant find the answer to my question(s).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How to filter a column with text only without using the page or visual filters.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am creating a report that shows how many sales have been made by source.&amp;nbsp; We have many online platforms and this leads me onto my next question.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What i was hoping to do was to filter by source.&amp;nbsp; Then each of the sources has their own fees to take into account.&amp;nbsp; Over all i am wanting to be able to create a report that does the following.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Calculates totals by source.&lt;/P&gt;&lt;P&gt;deduct the differnt fees per source to provide an exact profit report.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Exaple&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Source 1, base fee 0.30p per transaction, 12% of total order.&lt;/P&gt;&lt;P&gt;Source 2, base fee 0.30p per transaction, 5% of total order.&lt;/P&gt;&lt;P&gt;Source 3, base fee 0.30p per transaction, 7% of total order.&lt;/P&gt;&lt;P&gt;Source 4, base fee 0.00p per transaction, 20% of total order.&lt;/P&gt;&lt;P&gt;Source 5, base fee,&amp;nbsp; 15% of total order. or £1 depending what value is more&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a calender table and date table. with most of the measures as i am 80 %complete just need this part answering.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many thanks&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ben&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jan 2020 15:33:42 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filtering-a-cloumn-with-text/m-p/902340#M8288</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-01-16T15:33:42Z</dc:date>
    </item>
    <item>
      <title>Re: Filtering a cloumn with text</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filtering-a-cloumn-with-text/m-p/903868#M8377</link>
      <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;since you have provided very little information about your model and data, this is a bit of guess work. Are you sure you can't handle fees within a calculated column, like this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;sales fee =
VAR _sumFees =
    transactions[total order value]
        * LOOKUPVALUE (
            dimFees[base transaction fee];
            dimFees[source]; transactions[source]
        )
        + transactions[total order value]
            * LOOKUPVALUE (
                dimFees[percentage of total order];
                dimFees[source]; transactions[source]
            )
VAR _minFee =
    LOOKUPVALUE ( dimFees[minimum value]; dimFees[source]; transactions[source] )
RETURN
    IF ( _sumFees &amp;gt; _minFee; _sumFees; _minFee )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;if you need it as a measure you should look into the sumx-function&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Measure =
SUMX (
    VALUES ( transactions[transactionID] );
    VAR _source =
        SELECTEDVALUE ( transactions[source] )
    VAR _minFee =
        LOOKUPVALUE ( dimFees[minimum value]; dimFees[source]; _source )
    VAR _baseFeePrTrans =
        LOOKUPVALUE ( dimFees[base transaction fee]; dimFees[source]; _source )
    VAR _totalFee =
        LOOKUPVALUE ( dimFees[percentage of total order]; dimFees[source]; _source )
    RETURN
        IF (
            CALCULATE ( SUM ( transactions[total order value] ) ) * _totalFee
                + CALCULATE ( COUNT ( transactions[transactionID] ) ) * _baseFeePrTrans &amp;lt; _minFee;
            _minFee;
            CALCULATE ( SUM ( transactions[total order value] ) ) * _totalFee
                + CALCULATE ( COUNT ( transactions[transactionID] ) ) * _baseFeePrTrans
        )
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cheers,&lt;BR /&gt;Sturla&lt;BR /&gt;&lt;BR /&gt;If this post helps, then please consider Accepting it as the solution. Kudos are nice too.&lt;/P&gt;</description>
      <pubDate>Fri, 17 Jan 2020 23:33:58 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filtering-a-cloumn-with-text/m-p/903868#M8377</guid>
      <dc:creator>sturlaws</dc:creator>
      <dc:date>2020-01-17T23:33:58Z</dc:date>
    </item>
  </channel>
</rss>

