I'm new to Power BI and DAX and I find something really confusing:
I cannot understand why I cannot use some columns in measures and filters.
Example:
If I have a table with:
Code | Index |
20 | 1 |
45 | 1 |
I can do measure = SUM([Code],[Index]) but if I use CONCATENATE() instead of SUM() it cannot find the [Code] and [Index] columns. Yet if I run the SUM([Code],[Index] as Measure 1 and then try to CONCATENATE() as Measure 2 it can find the Measure 1 column?
Next, I have a record table:
Customer | Year | Acquisition | Loss |
20 | 2015 | 5 | 3 |
20 | 2016 | 6 | 1 |
40 | 2014 | 4 | 0 |
40 | 2015 | 4 | 1 |
And a calendar table:
Year | Initial Value | Acquisition | Loss |
2014 | |||
2015 | |||
2016 |
To calculate initial value per year I need to calculate the difference bewtween acquisitions and loss of the prior year. I attempt the following:
Initial Value = CALCULATE(record[acquisition]-record[loss], FILTER(ALL(record[Year]), record[Year]=[Year]-1))
However it cannot find the [Year] of my calendar table, even if I explicitely write calendar[Year]-1.
What's the problem with that? I'm really confused here.