Forum Discussion
Anonymous
4 years agoNot applicable
How to pull the data for specific Column?
Excel file I want to pull the data for the two measures. For the first measure, I want to pull the data for the past month from the 0th Column. I created first measure1. And for the...
Anonymous
4 years agoNot applicable
Hello I unpivoted data in Power Bi still I am strugging for pulling the data.
lbendlin
4 years agoSuper User
Please provide sanitized sample data that fully covers your issue.
Please show the expected outcome based on the sample data you provided.
- Anonymous4 years agoNot applicable
I updated it with excel file in my post
- lbendlin4 years agoSuper User
First step: unpivot. Note that your first two columns are missing a column name so I excluded them
let Source = Excel.Workbook(File.Contents("C:\Users\me\Downloads\excel.xlsx"), null, false), #"Projektprognos _sheet" = Source{[Item="Projektprognos ",Kind="Sheet"]}[Data], #"Removed Top Rows" = Table.Skip(#"Projektprognos _sheet", 1), #"Removed Columns" = Table.RemoveColumns(#"Removed Top Rows",{"Column1", "Column2", "Column18"}), #"Promoted Headers" = Table.PromoteHeaders(#"Removed Columns", [PromoteAllScalars=true]), #"Unpivoted Other Columns" = Table.UnpivotOtherColumns(#"Promoted Headers", {"Typ", "Period"}, "Attribute", "Value"), #"Changed Type" = Table.TransformColumnTypes(#"Unpivoted Other Columns",{{"Value", Currency.Type}, {"Attribute", Int64.Type}, {"Period", type date}}) in #"Changed Type"Now you can create your measures, one against Attribute 0 and the other against all other attributes.
- Anonymous4 years agoNot applicable
Hello I already created unpivoted before. The only problem with the second measure I am getting. I am getting the wrong data. I created measure1 for the 0th attribute.
Measure1 =CALCULATE(SUM('Projektprognos (2)'[Value]),FILTER('Projektprognos (2)', ([Attribute]<1)))