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

DAX query on data warehouse tables

$
0
0

I have a fact table that contains measurements for a person, that looks like this:

 

FactTable.JPG

 

And a dimension table that holds information about the person, such as their date of birth, like so:

 

Dimension.JPG

 

I want to build a report that shows the measurements at the age of the person when the measurement was taken.

 

My approach thus far is to create a new column in my fact table that calculates the age of the person at the date the measurement was taken, but it won't let me introduce the dimension table in my DAX query:

 

Age at Measurement = DATEDIFF([FactTable].[Date of Measurement], [but I can't put dimension table in here])

The query will only consider other columns from the fact table that the column is being added to. 

 

Obviously this problem scales up to pretty much any query that combines multiple tables.

 

Any ideas on how to get around this?


Viewing all articles
Browse latest Browse all 213819

Trending Articles



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