<?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: Urgent help on convertion from Rows values to Column values in Power Bi in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Urgent-help-on-convertion-from-Rows-values-to-Column-values-in/m-p/4096752#M162580</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I am not sure if I understood your question correctly, but please check the below picture and the atthached pbix file.&lt;/P&gt;
&lt;P&gt;One of ways is to transform data like below in power query editor.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;let
    Source = data_source,
    #"Unpivoted Other Columns" = Table.UnpivotOtherColumns(Source, {"POLICY_7DIGIT"}, "Attribute", "Value"),
    #"Grouped Rows" = Table.Group(#"Unpivoted Other Columns", {"POLICY_7DIGIT"}, {{"data", each _, type table [POLICY_7DIGIT=nullable number, Attribute=text, Value=any]}}),
    #"Added Custom" = Table.AddColumn(#"Grouped Rows", "Index", each Table.AddIndexColumn([data],"Index_Per_Policy",0,1)),
    #"Removed Other Columns" = Table.SelectColumns(#"Added Custom",{"Index"}),
    #"Expanded Index" = Table.ExpandTableColumn(#"Removed Other Columns", "Index", {"POLICY_7DIGIT", "Attribute", "Value", "Index_Per_Policy"}, {"POLICY_7DIGIT", "Attribute", "Value", "Index_Per_Policy"}),
    #"Integer-Divided Column" = Table.TransformColumns(#"Expanded Index", {{"Index_Per_Policy", each Number.IntegerDivide(_, 3), Int64.Type}}),
    #"Pivoted Column" = Table.Pivot(#"Integer-Divided Column", List.Distinct(#"Integer-Divided Column"[Attribute]), "Attribute", "Value"),
    #"Replaced Value" = Table.ReplaceValue(#"Pivoted Column","N/A",null,Replacer.ReplaceValue,{"BUYING_YEARS_MONTHS", "INTEREST_RATE_CALCULATION", "INCREASED_LIVING_BENEFIT"}),
    #"Changed Type" = Table.TransformColumnTypes(#"Replaced Value",{{"BUYING_YEARS_MONTHS", type date}, {"INTEREST_RATE_CALCULATION", type number}, {"INCREASED_LIVING_BENEFIT", Int64.Type}})
in
    #"Changed Type"&lt;/LI-CODE&gt;</description>
    <pubDate>Tue, 13 Aug 2024 06:04:11 GMT</pubDate>
    <dc:creator>Jihwan_Kim</dc:creator>
    <dc:date>2024-08-13T06:04:11Z</dc:date>
    <item>
      <title>Urgent help on convertion from Rows values to Column values in Power Bi</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Urgent-help-on-convertion-from-Rows-values-to-Column-values-in/m-p/4096632#M162576</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please help on the below sample data and attached screenshot to convert from&amp;nbsp;Rows values to Column values in Power Bi.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tried so many triles, but unable to reach to solution in Power BI. Please help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the screenshot of date need to convert from&amp;nbsp;Rows values to Column values in Power Bi visualization.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;OUTPUT:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;At present data looks like row wise in Power BI. Below is the example information unable to upload file in community.&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;STRONG&gt;Here are the records to get the output in power bi. If you direcctly past it in excel it's works. Please help&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;POLICY_7DIGIT BUYING_YEARS_MONTHS INTEREST_RATE_CALCULATION INCREASED_LIVING_BENEFIT&lt;BR /&gt;8514723 01-10-2023 0.0025 7&lt;BR /&gt;8514723 01-09-2023 0.0025 7&lt;BR /&gt;8514723 01-08-2023 0.0025 6&lt;BR /&gt;8514723 01-07-2023 0.0025 6&lt;BR /&gt;8514723 01-06-2023 0.0025 6&lt;BR /&gt;8514723 01-05-2023 0.0025 6&lt;BR /&gt;8514723 01-04-2023 0.0025 5&lt;BR /&gt;8514723 01-03-2023 0.0025 5&lt;BR /&gt;8514723 01-02-2023 0.0025 5&lt;BR /&gt;8514723 01-01-2023 0.0025 4&lt;BR /&gt;8514723 01-12-2022 0.0025 4&lt;BR /&gt;8514723 01-11-2022 0.0025 4&lt;BR /&gt;8514723 01-10-2022 0.0025 4&lt;BR /&gt;8303084&lt;BR /&gt;8009603&lt;BR /&gt;7867950&lt;BR /&gt;7801142&lt;BR /&gt;7758047 01-06-2018 0.0055 0&lt;BR /&gt;7758047 01-05-2018 0 0&lt;BR /&gt;7758047 01-05-2018 0 7000&lt;BR /&gt;7758047 01-05-2018 0.0055 0&lt;BR /&gt;7758047 01-04-2018 0 0&lt;BR /&gt;7758047 01-04-2018 0 7000&lt;BR /&gt;7758047 01-04-2018 0.0055 0&lt;BR /&gt;7758047 01-03-2018 0 0&lt;BR /&gt;7758047 01-03-2018 0 7000&lt;BR /&gt;7758047 01-03-2018 0.0055 0&lt;BR /&gt;7758047 01-02-2018 0 0&lt;BR /&gt;7758047 01-02-2018 0 7000&lt;BR /&gt;7758047 01-02-2018 0.0055 0&lt;BR /&gt;7758047 01-01-2018 0 0&lt;BR /&gt;7758047 01-01-2018 0 7000&lt;BR /&gt;7758047 01-01-2018 0.0055 0&lt;BR /&gt;7758047 01-12-2017 0 0&lt;BR /&gt;7758047 01-12-2017 0 7000&lt;BR /&gt;7758047 01-12-2017 0.0055 0&lt;BR /&gt;7758047 01-11-2017 0 0&lt;BR /&gt;7758047 01-11-2017 0 7000&lt;BR /&gt;7758047 01-11-2017 0.0055 0&lt;BR /&gt;7758047 01-10-2017 0 0&lt;BR /&gt;7758047 01-10-2017 0 7000&lt;BR /&gt;7758047 01-10-2017 0.0055 0&lt;BR /&gt;7758047 01-09-2017 0 0&lt;BR /&gt;7758047 01-09-2017 0 7000&lt;BR /&gt;7758047 01-09-2017 0.0055 0&lt;BR /&gt;7758047 01-08-2017 0 0&lt;BR /&gt;7758047 01-08-2017 0 7000&lt;BR /&gt;7758047 01-08-2017 0.0055 0&lt;BR /&gt;7758047 01-07-2017 0 0&lt;BR /&gt;7758047 01-07-2017 0 7000&lt;BR /&gt;7758047 01-07-2017 0.0055 0&lt;BR /&gt;7758047&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Aug 2024 05:52:57 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Urgent-help-on-convertion-from-Rows-values-to-Column-values-in/m-p/4096632#M162576</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-08-13T05:52:57Z</dc:date>
    </item>
    <item>
      <title>Re: Urgent help on convertion from Rows values to Column values in Power Bi</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Urgent-help-on-convertion-from-Rows-values-to-Column-values-in/m-p/4096709#M162578</link>
      <description>&lt;P&gt;hello&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;you surely can do this with DAX, but there is a drawback.&lt;/P&gt;&lt;P&gt;since you want to put it horizontally, you need to create multiple column so you need to ADDCOLUMN for every value. and if there is another input for same POLICY_ID, you need ADDCOLUMN manually again to create more columns.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;there is a way to make your need without much change is by using matrix visual.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope this will help you.&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Tue, 13 Aug 2024 05:48:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Urgent-help-on-convertion-from-Rows-values-to-Column-values-in/m-p/4096709#M162578</guid>
      <dc:creator>Irwan</dc:creator>
      <dc:date>2024-08-13T05:48:02Z</dc:date>
    </item>
    <item>
      <title>Re: Urgent help on convertion from Rows values to Column values in Power Bi</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Urgent-help-on-convertion-from-Rows-values-to-Column-values-in/m-p/4096728#M162579</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="490030" data-lia-user-login="Irwan" class="lia-mention lia-mention-user"&gt;Irwan&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried with matrix visual also, but I need in DAX. Can you please try first POLICY_ID. Please help&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;OUTPUT:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Aug 2024 05:57:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Urgent-help-on-convertion-from-Rows-values-to-Column-values-in/m-p/4096728#M162579</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-08-13T05:57:36Z</dc:date>
    </item>
    <item>
      <title>Re: Urgent help on convertion from Rows values to Column values in Power Bi</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Urgent-help-on-convertion-from-Rows-values-to-Column-values-in/m-p/4096752#M162580</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I am not sure if I understood your question correctly, but please check the below picture and the atthached pbix file.&lt;/P&gt;
&lt;P&gt;One of ways is to transform data like below in power query editor.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;let
    Source = data_source,
    #"Unpivoted Other Columns" = Table.UnpivotOtherColumns(Source, {"POLICY_7DIGIT"}, "Attribute", "Value"),
    #"Grouped Rows" = Table.Group(#"Unpivoted Other Columns", {"POLICY_7DIGIT"}, {{"data", each _, type table [POLICY_7DIGIT=nullable number, Attribute=text, Value=any]}}),
    #"Added Custom" = Table.AddColumn(#"Grouped Rows", "Index", each Table.AddIndexColumn([data],"Index_Per_Policy",0,1)),
    #"Removed Other Columns" = Table.SelectColumns(#"Added Custom",{"Index"}),
    #"Expanded Index" = Table.ExpandTableColumn(#"Removed Other Columns", "Index", {"POLICY_7DIGIT", "Attribute", "Value", "Index_Per_Policy"}, {"POLICY_7DIGIT", "Attribute", "Value", "Index_Per_Policy"}),
    #"Integer-Divided Column" = Table.TransformColumns(#"Expanded Index", {{"Index_Per_Policy", each Number.IntegerDivide(_, 3), Int64.Type}}),
    #"Pivoted Column" = Table.Pivot(#"Integer-Divided Column", List.Distinct(#"Integer-Divided Column"[Attribute]), "Attribute", "Value"),
    #"Replaced Value" = Table.ReplaceValue(#"Pivoted Column","N/A",null,Replacer.ReplaceValue,{"BUYING_YEARS_MONTHS", "INTEREST_RATE_CALCULATION", "INCREASED_LIVING_BENEFIT"}),
    #"Changed Type" = Table.TransformColumnTypes(#"Replaced Value",{{"BUYING_YEARS_MONTHS", type date}, {"INTEREST_RATE_CALCULATION", type number}, {"INCREASED_LIVING_BENEFIT", Int64.Type}})
in
    #"Changed Type"&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 13 Aug 2024 06:04:11 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Urgent-help-on-convertion-from-Rows-values-to-Column-values-in/m-p/4096752#M162580</guid>
      <dc:creator>Jihwan_Kim</dc:creator>
      <dc:date>2024-08-13T06:04:11Z</dc:date>
    </item>
  </channel>
</rss>

