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...
lbendlin
4 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.
Anonymous
4 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)
)
)
- lbendlin4 years agoSuper User
Measure1 = CALCULATE(sum('Projektprognos (2)'[Value]),'Projektprognos (2)'[Attribute]=0) Measure2 = CALCULATE(sum('Projektprognos (2)'[Value]),'Projektprognos (2)'[Attribute]>0)- Anonymous4 years agoNot applicable
Thank you for the suggestion however measure2 I tried the same method however I cannot get these values in highlighted
- lbendlin4 years agoSuper User
Please state your calculation rules again. I am not clear which rule should be applied for attribute 0 versus the other ones.