Quantcast
Channel: Desktop topics
Viewing all articles
Browse latest Browse all 216047

Confusion as to what columns I can use for measures and filters

$
0
0

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:

 

CodeIndex
201
451

 

 

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:

 

CustomerYearAcquisitionLoss
20201553
20201661
40201440
40201541

 

 

And a calendar table:

 

YearInitial ValueAcquisitionLoss
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.


Viewing all articles
Browse latest Browse all 216047

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>