Forum Discussion
Operand Type Null Error
Hi WSMikey ,
Please use a measure rather than calculated column. Then replace these columns in the formula with the aggregated value of the corresponding columns, for example:
Current_Period_Budget =
VAR Period = [SelectedMonth]
RETURN
SWITCH (
Period,
9, SUM ( GLAFS[NETPERD1] ),
10, SUM ( GLAFS[NETPERD2] ),
11, SUM ( GLAFS[NETPERD3] ),
12, SUM ( GLAFS[NETPERD4] ),
1, SUM ( GLAFS[NETPERD5] ),
2, SUM ( GLAFS[NETPERD6] ),
3, SUM ( GLAFS[NETPERD7] ),
4, SUM ( GLAFS[NETPERD8] ),
5, SUM ( GLAFS[NETPERD9] ),
6, SUM ( GLAFS[NETPERD10] ),
7, SUM ( GLAFS[NETPERD11] ),
8, SUM ( GLAFS[NETPERD12] )
)
If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi v-kkf-msft , thanks for the response! I have tested and still receive the same error. As such, i have changed my approach. Instead of linking the table as is, I used a custom SQL query to reconfigure and unpivot the data prior to being read by PowerBI. This simplified the project and solved my issue.