<?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 Crystal Report to Power BI query in Power Query</title>
    <link>https://community.fabric.microsoft.com/t5/Power-Query/Crystal-Report-to-Power-BI-query/m-p/845079#M28362</link>
    <description>&lt;P&gt;Dear community,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have an existing report done with Crystal Report.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;While converting it to Power BI, I am stuck at the following Formula:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;local stringvar warehouse := "";&lt;/P&gt;&lt;P&gt;if {Command.ABD_ORDER_POINT} - {Command.ABD_QIS} + {Command.ABD_QID} &amp;gt; {Command.ABDNetQty} then&lt;BR /&gt;(IF warehouse = "" then warehouse := warehouse + "*ABD*" else warehouse := warehouse + ", *ABD*")&lt;BR /&gt;else if {Command.ABD_ORDER_POINT} &amp;gt; 0 then&lt;BR /&gt;(if warehouse = "" then warehouse := warehouse + "ABD" else warehouse := warehouse + ", ABD");&lt;/P&gt;&lt;P&gt;if {Command.ALS_ORDER_POINT} - {Command.ALS_QIS} + {Command.ALS_QID} &amp;gt; {Command.ALSNetQty} then&lt;BR /&gt;(IF warehouse = "" then warehouse := warehouse + "*ALS*" else warehouse := warehouse + ", *ALS*")&lt;BR /&gt;else if {Command.ALS_ORDER_POINT} &amp;gt; 0 then&lt;BR /&gt;(IF warehouse = "" then warehouse := warehouse + "ALS" else warehouse := warehouse + ", ALS");&lt;/P&gt;&lt;P&gt;if {Command.ALSVC_ORDER_POINT} - {Command.ALSVC_QIS} + {Command.ALSVC_QID} &amp;gt; {Command.ALSVCNetQty} then&lt;BR /&gt;(IF warehouse = "" then warehouse := warehouse + "*ALS-VC*" else warehouse := warehouse + ", *ALS-VC*")&lt;BR /&gt;else if {Command.ALSVC_ORDER_POINT} &amp;gt; 0 then&lt;BR /&gt;(IF warehouse = "" then warehouse := warehouse + "ALS-VC" else warehouse := warehouse + ", ALS-VC");&lt;/P&gt;&lt;P&gt;if isnull({Command.NEXT_ORDER_REQUIRED_BY}) = false then&lt;BR /&gt;(IF warehouse = "" then warehouse := warehouse + "*" + (IF {Command.DEMAND_WHSE} = "UNIVERSAL" THEN "C2" ELSE {Command.DEMAND_WHSE}) + "*" else warehouse := warehouse + ", *" + (IF {Command.DEMAND_WHSE} = "UNIVERSAL" THEN "C2" ELSE {Command.DEMAND_WHSE}) + "*");&lt;/P&gt;&lt;P&gt;warehouse&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;I was able to convert the query to run in Power BI as below however Power BI is not able to recognize 'warehouse'&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;if ([ABD_ORDER_POINT] - [ABD_QIS] + [ABD_QID]) &amp;gt; [ABDNetQty] then&lt;BR /&gt;if warehouse = "" then warehouse &amp;amp; "*ABD*" else warehouse &amp;amp; " *ABD*"&lt;BR /&gt;else if [ABD_ORDER_POINT] &amp;gt; 0 then&lt;BR /&gt;if warehouse = "" then warehouse &amp;amp; "ABD" else warehouse &amp;amp; ", ABD" else&lt;/P&gt;&lt;P&gt;if ([ALS_ORDER_POINT] - [ALS_QIS] + [ALS_QID]) &amp;gt; [ALSNetQty] then&lt;BR /&gt;if warehouse = "" then warehouse &amp;amp; "*ALS*" else warehouse &amp;amp; ", *ALS*"&lt;BR /&gt;else if [ALS_ORDER_POINT] &amp;gt; 0 then&lt;BR /&gt;if warehouse = "" then warehouse &amp;amp; "ALS" else warehouse &amp;amp; ", ALS" else&lt;/P&gt;&lt;P&gt;if ([ALSVC_ORDER_POINT] - [ALSVC_QIS] + [ALSVC_QID]) &amp;gt; [ALSVCNetQty] then&lt;BR /&gt;if warehouse = "" then warehouse &amp;amp; "*ALS-VC*" else warehouse &amp;amp; ", *ALS-VC*"&lt;BR /&gt;else if [ALSVC_ORDER_POINT] &amp;gt; 0 then&lt;BR /&gt;if warehouse = "" then warehouse &amp;amp; "ALS-VC" else warehouse &amp;amp; ", ALS-VC" else&lt;/P&gt;&lt;P&gt;if [NEXT_ORDER_REQUIRED_BY] &amp;lt;&amp;gt; null then&lt;BR /&gt;if warehouse = "" then warehouse &amp;amp; "*" &amp;amp; (if [DEMAND_WHSE] = "UNIVERSAL" then "C2" else [DEMAND_WHSE]) &amp;amp; "*" else warehouse &amp;amp; ", *" &amp;amp; (if [DEMAND_WHSE] = "UNIVERSAL" then "C2" else [DEMAND_WHSE]) &amp;amp; "*"&lt;BR /&gt;else&lt;BR /&gt;warehouse&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Looking forward for a quick help from experts in our PBI Community.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you very much in advance.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Pankajj&lt;/P&gt;</description>
    <pubDate>Wed, 13 Nov 2019 15:23:49 GMT</pubDate>
    <dc:creator>pankajj</dc:creator>
    <dc:date>2019-11-13T15:23:49Z</dc:date>
    <item>
      <title>Crystal Report to Power BI query</title>
      <link>https://community.fabric.microsoft.com/t5/Power-Query/Crystal-Report-to-Power-BI-query/m-p/845079#M28362</link>
      <description>&lt;P&gt;Dear community,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have an existing report done with Crystal Report.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;While converting it to Power BI, I am stuck at the following Formula:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;local stringvar warehouse := "";&lt;/P&gt;&lt;P&gt;if {Command.ABD_ORDER_POINT} - {Command.ABD_QIS} + {Command.ABD_QID} &amp;gt; {Command.ABDNetQty} then&lt;BR /&gt;(IF warehouse = "" then warehouse := warehouse + "*ABD*" else warehouse := warehouse + ", *ABD*")&lt;BR /&gt;else if {Command.ABD_ORDER_POINT} &amp;gt; 0 then&lt;BR /&gt;(if warehouse = "" then warehouse := warehouse + "ABD" else warehouse := warehouse + ", ABD");&lt;/P&gt;&lt;P&gt;if {Command.ALS_ORDER_POINT} - {Command.ALS_QIS} + {Command.ALS_QID} &amp;gt; {Command.ALSNetQty} then&lt;BR /&gt;(IF warehouse = "" then warehouse := warehouse + "*ALS*" else warehouse := warehouse + ", *ALS*")&lt;BR /&gt;else if {Command.ALS_ORDER_POINT} &amp;gt; 0 then&lt;BR /&gt;(IF warehouse = "" then warehouse := warehouse + "ALS" else warehouse := warehouse + ", ALS");&lt;/P&gt;&lt;P&gt;if {Command.ALSVC_ORDER_POINT} - {Command.ALSVC_QIS} + {Command.ALSVC_QID} &amp;gt; {Command.ALSVCNetQty} then&lt;BR /&gt;(IF warehouse = "" then warehouse := warehouse + "*ALS-VC*" else warehouse := warehouse + ", *ALS-VC*")&lt;BR /&gt;else if {Command.ALSVC_ORDER_POINT} &amp;gt; 0 then&lt;BR /&gt;(IF warehouse = "" then warehouse := warehouse + "ALS-VC" else warehouse := warehouse + ", ALS-VC");&lt;/P&gt;&lt;P&gt;if isnull({Command.NEXT_ORDER_REQUIRED_BY}) = false then&lt;BR /&gt;(IF warehouse = "" then warehouse := warehouse + "*" + (IF {Command.DEMAND_WHSE} = "UNIVERSAL" THEN "C2" ELSE {Command.DEMAND_WHSE}) + "*" else warehouse := warehouse + ", *" + (IF {Command.DEMAND_WHSE} = "UNIVERSAL" THEN "C2" ELSE {Command.DEMAND_WHSE}) + "*");&lt;/P&gt;&lt;P&gt;warehouse&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;I was able to convert the query to run in Power BI as below however Power BI is not able to recognize 'warehouse'&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;if ([ABD_ORDER_POINT] - [ABD_QIS] + [ABD_QID]) &amp;gt; [ABDNetQty] then&lt;BR /&gt;if warehouse = "" then warehouse &amp;amp; "*ABD*" else warehouse &amp;amp; " *ABD*"&lt;BR /&gt;else if [ABD_ORDER_POINT] &amp;gt; 0 then&lt;BR /&gt;if warehouse = "" then warehouse &amp;amp; "ABD" else warehouse &amp;amp; ", ABD" else&lt;/P&gt;&lt;P&gt;if ([ALS_ORDER_POINT] - [ALS_QIS] + [ALS_QID]) &amp;gt; [ALSNetQty] then&lt;BR /&gt;if warehouse = "" then warehouse &amp;amp; "*ALS*" else warehouse &amp;amp; ", *ALS*"&lt;BR /&gt;else if [ALS_ORDER_POINT] &amp;gt; 0 then&lt;BR /&gt;if warehouse = "" then warehouse &amp;amp; "ALS" else warehouse &amp;amp; ", ALS" else&lt;/P&gt;&lt;P&gt;if ([ALSVC_ORDER_POINT] - [ALSVC_QIS] + [ALSVC_QID]) &amp;gt; [ALSVCNetQty] then&lt;BR /&gt;if warehouse = "" then warehouse &amp;amp; "*ALS-VC*" else warehouse &amp;amp; ", *ALS-VC*"&lt;BR /&gt;else if [ALSVC_ORDER_POINT] &amp;gt; 0 then&lt;BR /&gt;if warehouse = "" then warehouse &amp;amp; "ALS-VC" else warehouse &amp;amp; ", ALS-VC" else&lt;/P&gt;&lt;P&gt;if [NEXT_ORDER_REQUIRED_BY] &amp;lt;&amp;gt; null then&lt;BR /&gt;if warehouse = "" then warehouse &amp;amp; "*" &amp;amp; (if [DEMAND_WHSE] = "UNIVERSAL" then "C2" else [DEMAND_WHSE]) &amp;amp; "*" else warehouse &amp;amp; ", *" &amp;amp; (if [DEMAND_WHSE] = "UNIVERSAL" then "C2" else [DEMAND_WHSE]) &amp;amp; "*"&lt;BR /&gt;else&lt;BR /&gt;warehouse&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Looking forward for a quick help from experts in our PBI Community.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you very much in advance.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Pankajj&lt;/P&gt;</description>
      <pubDate>Wed, 13 Nov 2019 15:23:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Power-Query/Crystal-Report-to-Power-BI-query/m-p/845079#M28362</guid>
      <dc:creator>pankajj</dc:creator>
      <dc:date>2019-11-13T15:23:49Z</dc:date>
    </item>
    <item>
      <title>Re: Crystal Report to Power BI query</title>
      <link>https://community.fabric.microsoft.com/t5/Power-Query/Crystal-Report-to-Power-BI-query/m-p/845420#M28382</link>
      <description>&lt;P&gt;"warehouse" is a variable Crystal is building. Power Query doesn't work that way. I think you'll need to rebuild it from the ground up to get the same result. It would be like copying and pasting in a formula from Excel or a SQL statement. You need to adjust it to the language you are using, which is M in this case.&lt;/P&gt;</description>
      <pubDate>Wed, 13 Nov 2019 23:17:32 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Power-Query/Crystal-Report-to-Power-BI-query/m-p/845420#M28382</guid>
      <dc:creator>edhans</dc:creator>
      <dc:date>2019-11-13T23:17:32Z</dc:date>
    </item>
    <item>
      <title>Re: Crystal Report to Power BI query</title>
      <link>https://community.fabric.microsoft.com/t5/Power-Query/Crystal-Report-to-Power-BI-query/m-p/846357#M28410</link>
      <description>&lt;P&gt;&lt;SPAN class="lia-mentions-symbol"&gt;@&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;edhans,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you very much Edhans!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Really appreciate your observation and recommendations.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you please suggest how to alter the formula.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Pankajj&lt;/P&gt;</description>
      <pubDate>Thu, 14 Nov 2019 15:44:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Power-Query/Crystal-Report-to-Power-BI-query/m-p/846357#M28410</guid>
      <dc:creator>pankajj</dc:creator>
      <dc:date>2019-11-14T15:44:55Z</dc:date>
    </item>
    <item>
      <title>Re: Crystal Report to Power BI query</title>
      <link>https://community.fabric.microsoft.com/t5/Power-Query/Crystal-Report-to-Power-BI-query/m-p/846439#M28416</link>
      <description>&lt;P&gt;I'd start one piece at a time. Create a new formula in Crystal, and do one small part. Then replicate that in Power Query. Then keep going until you get it to return the same answer. I've had to redo some Crystal Reports in Power Query/Power BI, and it is a tedious conversion. There is no automated way to do it that I am aware of.&lt;/P&gt;</description>
      <pubDate>Thu, 14 Nov 2019 17:21:47 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Power-Query/Crystal-Report-to-Power-BI-query/m-p/846439#M28416</guid>
      <dc:creator>edhans</dc:creator>
      <dc:date>2019-11-14T17:21:47Z</dc:date>
    </item>
  </channel>
</rss>

