Forum Discussion

dom-mitchell's avatar
dom-mitchell
Frequent Visitor
2 years ago

Pulling a Measure into a Table based on Filters

Hi there, this one has me stumped...

What I am looking to achieve is a calculated column ( [Invoiced] ) in a table ( 'MonthNumber' ) that shows the value from a measure ( 'Invoiced Deal Data'[Total Invoiced Business in GBP] ) based on the data in columns [Consultant] and [Month].

'MonthNumber' has data in it that looks like this:

ConsultantMonth NumberMonthInvoiced
A1April 2023 
A2May 2023 
A3June 2023 
A4July 2023 
B1May 2023 
B2June 2023 
B3July 2023 
C1July 2023 


The measure I'm looking to use ( [Total Invoiced Business in GBP] ) is the aggreated sum of a series of different calculated columns in various other tables but all the date columns across the whole dataset are all linked via relationships to common Calendar table - 'FT Dates'.

Likewise, the Consultant column has a relationship to another table 'ConsultantList' which is the common list and also has a relationship to the Consultant column in 'Invoiced Deal Data'. 

I've tried a number of different ways but everthing ends up in an #ERROR in the new Invoiced column. Most recent attempt is 

 

Invoiced = CALCULATE('Invoiced Deal Data'[Total Invoiced Business in GBP], MATCHBY (ConsultantList[Consultant],MonthNumber[Consultant],'Invoiced Deal Data'[Invoiced Date]),MonthNumber[Month])

 


Absolute car crash I'm sure but if anyone can point me in the right direction, that would be amazing. 
 

1 Reply