Forum Discussion

DataSciWannabe's avatar
DataSciWannabe
Frequent Visitor
7 years ago

Measure to Count Measure Instances (Two Data Tables)

 

Does anyone know a DAX formula to do a count of the results of a measure that refers to two different data tables?

 

I have two data tables (one is a copy of another), to start I created matching measures for the two data tables to pull the average sale price 

 

Price1 = CALCULATE([Price],FILTER('Data','Data'[Month]=7),FILTER('Data','Data'[Year]=2018))

 

Price2 = CALCULATE([Price2],FILTER('Data2','Data2'[Month]=12),FILTER('Data2','Data2'[Year]=2018))

 

Then the formula for the variance between the two is below:

 

PriceVar = [Price2]/[Price1]-1

 

This is the formula I am looking to count the number of items (column in each of the data tables) where the PriceVar measure is below 5% for example.

1 Reply

  • v-danhe-msft's avatar
    v-danhe-msft
    Icon for Microsoft Employee rankMicrosoft Employee

    Hi DataSciWannabe,

    Could you please offer a sample data to have a test and post your desired result if possible?

     

    Regards,

    Daniel He