<?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 How to create a lookup between a calculated column and a measure in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-create-a-lookup-between-a-calculated-column-and-a-measure/m-p/1319912#M23204</link>
    <description>&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;X(Calculated Coulmn)&lt;/TD&gt;&lt;TD&gt;CDF(Measure)&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;100&lt;/TD&gt;&lt;TD&gt;.11&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;150&lt;/TD&gt;&lt;TD&gt;.24&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;200&lt;/TD&gt;&lt;TD&gt;.30&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;I have a CDF probaility table created with x value as caclulated column and CDF value f(x) with a measure. Now i hope to get quartiles of the CDF . Like i want the value of x where CDF is 0.25. How can i do that? Kindly help&lt;/P&gt;</description>
    <pubDate>Mon, 24 Aug 2020 15:58:15 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2020-08-24T15:58:15Z</dc:date>
    <item>
      <title>How to create a lookup between a calculated column and a measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-create-a-lookup-between-a-calculated-column-and-a-measure/m-p/1319912#M23204</link>
      <description>&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;X(Calculated Coulmn)&lt;/TD&gt;&lt;TD&gt;CDF(Measure)&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;100&lt;/TD&gt;&lt;TD&gt;.11&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;150&lt;/TD&gt;&lt;TD&gt;.24&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;200&lt;/TD&gt;&lt;TD&gt;.30&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;I have a CDF probaility table created with x value as caclulated column and CDF value f(x) with a measure. Now i hope to get quartiles of the CDF . Like i want the value of x where CDF is 0.25. How can i do that? Kindly help&lt;/P&gt;</description>
      <pubDate>Mon, 24 Aug 2020 15:58:15 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-create-a-lookup-between-a-calculated-column-and-a-measure/m-p/1319912#M23204</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-08-24T15:58:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a lookup between a calculated column and a measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-create-a-lookup-between-a-calculated-column-and-a-measure/m-p/1320484#M23216</link>
      <description>&lt;P&gt;You will have to write another measure that does the quartile computation independently of your first measure.&lt;/P&gt;</description>
      <pubDate>Mon, 24 Aug 2020 19:05:39 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-create-a-lookup-between-a-calculated-column-and-a-measure/m-p/1320484#M23216</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2020-08-24T19:05:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a lookup between a calculated column and a measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-create-a-lookup-between-a-calculated-column-and-a-measure/m-p/1320777#M23231</link>
      <description>&lt;LI-CODE lang="csharp"&gt;// There must be a table with a column
// from which you can choose the quantile
// percentage, like .25. The table that
// stores x and cdf(x) must start with x
// for which cdf(x) = 0 and end with x
// for which cdf(x) = 1. Here's a measure
// that returns the value of the quantile
// (linear approximation). Q table stores
// the percentages you'd like to calculate
// quantiles for. CDF table stores (x, cdf(x)).

[Quantile] =
var __percentage = SELECTEDVALUE( Q[Level], 2 )
var __cdfLessThanOrEqualToPercentage =
    TOPN(1
        FILTER(
            ALL( CDF ),
            CDF[cdf] &amp;lt;= __percentage
        ),
        CDF[cdf],
        DESC
    )
var __cdfGreaterThanPercentage =
    TOPN(1,
        FILTER(
            ALL( CDF ),
            CDF[cdf] &amp;gt; __percentage,
        ),
        CDF[cdf],
        ASC
    )
var __quantileEstimate =
    if(
        NOT ISEMPTY( __cdfGreaterThanPercentage ),
        
        var x1 = 
            MINX( 
                __cdfLessThanOrEqualToPercentage,
                CDF[x]
            )
        var y1 = 
            MINX( 
                __cdfLessThanOrEqualToPercentage,
                CDF[cdf]
            )
        var x2 =
            MINX(
                __cdfGreaterThanPercentage,
                CDF[x]
            )
        var y2 = 
            MINX(
                __cdfGreaterThanPercentage,
                CDF[cdf]
            )
        return
            divide( x2 - x1, y2 - y1)
                * (__percentage - y1)
                + x1
    )
return
    __quantileEstimate&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 24 Aug 2020 22:36:38 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-create-a-lookup-between-a-calculated-column-and-a-measure/m-p/1320777#M23231</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-08-24T22:36:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a lookup between a calculated column and a measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-create-a-lookup-between-a-calculated-column-and-a-measure/m-p/1321862#M23257</link>
      <description>&lt;P&gt;Hello, thank you for your help with this! In my model, only x is a column in a table. The CDF values are a measure which i was not able to convert into a calculated column. Therefore i am not able to implement your DAX in my model as it uses CDF with functions like ALL which i cannot use as my CDF is a measure. How can i find my quantiles?&lt;/P&gt;</description>
      <pubDate>Tue, 25 Aug 2020 08:13:47 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-create-a-lookup-between-a-calculated-column-and-a-measure/m-p/1321862#M23257</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-08-25T08:13:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a lookup between a calculated column and a measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-create-a-lookup-between-a-calculated-column-and-a-measure/m-p/1322249#M23264</link>
      <description>Anonymous&lt;/LI-USER&gt;&lt;BR /&gt;&lt;BR /&gt;If the measure only depends on the x value, then it's very easy to create a calculated table that will store x and cdf(x). Why can't you do this? But even if CDF is a measure, it should be pretty easy to adjust this code I gave you to calculate the quantiles. You just have to work with x and a measure instead of with a column.</description>
      <pubDate>Tue, 25 Aug 2020 09:58:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-create-a-lookup-between-a-calculated-column-and-a-measure/m-p/1322249#M23264</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-08-25T09:58:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a lookup between a calculated column and a measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-create-a-lookup-between-a-calculated-column-and-a-measure/m-p/1323099#M23295</link>
      <description>&lt;P&gt;Hello, made some updates and the Dax works!&lt;/P&gt;&lt;P&gt;Thank you so much for helping me with this. I probably could not have figured it out as am just getting started with Dax.&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Tue, 25 Aug 2020 14:26:00 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-create-a-lookup-between-a-calculated-column-and-a-measure/m-p/1323099#M23295</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-08-25T14:26:00Z</dc:date>
    </item>
  </channel>
</rss>

