Forum Discussion
'We cannot apply field access to the type Number. Deails: Value = 0, Key = M1'
- 2 years ago
Hi HC1801
I presume M1, M2 are Month 1 and Month 2 etc???. I can tell you straight off, if you want the resulting visual to mimic a Pivot table, you can't have your data structured like a Pivot table. Highlight all of the M columns and right click and choose unpivot columns. You will will now have Attribute & Value columns. To have them in order in the visual later, you will need to either convert them to a date if possible or create a number to sort by.
Highlight the Attribute column then Go to Add Column > Column from examples > selected then in the new column write 1 where M1 is write 2 where m2 is, then the others should Auto Populate. Press ok
Then try something like this when creating the custom column for your calculation.
if [Value] <> 0 then [Value] - [InvVat] else 0Load the data into your report. Go to table View highlight the Attribute column and sort by the number column you created.
Create a matrix table. Add the Attribute to the column filed of the Matrix table then add the calculation column you created to the values field and you will get the result you want.
Thanks
Joe
If this post helps, then please Accept it as the solution
Hi HC1801
I presume M1, M2 are Month 1 and Month 2 etc???. I can tell you straight off, if you want the resulting visual to mimic a Pivot table, you can't have your data structured like a Pivot table. Highlight all of the M columns and right click and choose unpivot columns. You will will now have Attribute & Value columns. To have them in order in the visual later, you will need to either convert them to a date if possible or create a number to sort by.
Highlight the Attribute column then Go to Add Column > Column from examples > selected then in the new column write 1 where M1 is write 2 where m2 is, then the others should Auto Populate. Press ok
Then try something like this when creating the custom column for your calculation.
if [Value] <> 0 then [Value] - [InvVat] else 0
Load the data into your report. Go to table View highlight the Attribute column and sort by the number column you created.
Create a matrix table. Add the Attribute to the column filed of the Matrix table then add the calculation column you created to the values field and you will get the result you want.
Thanks
Joe
If this post helps, then please Accept it as the solution
Thanks Joe,
This has worked so marked as solution. I haven't done the last part as I don't really understand what was meant by/the purpose of creating the matrix table. Everything before that is great though - didn't know what you could do with unpivoting columns, so that's really helpful!
Many thanks,
Chris