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

Difference between 2 columns in a Matrix Table

$
0
0

Hi all,

 

I was wondering if someone could help me.

 

I want to calculate the difference between two columns on a Matrix Table

At row Level I have Department.

At Column Level I have Date. This is an actual Date column within the Data

At Values Level I have headcount. This is a measure and the following formula has been used: DISTINCTCOUNT(‘Employee’[Person ID])

I essentially want to compare the difference in Headcount between two specific dates.

 

For Example:

 

April                       May                       Difference

Headcount          Headcount          Headcount

10                           9                              -1

 

I have read other blog post and I have tried the following formulas

 

Previous Month = CALCULATE([HEADCOUNT],FILTER(ALL(‘Employee’[Date].[Month]),MAX(‘Employee’[Date])-1))

Difference = IF(ISBLANK([Previous Month]=0),CALCULATE([Headcount]-[Previous Month]))

 

By the looks of the results I am getting Mays Data.

 

When using the difference formula I am getting blank spaces

 

Can anyone tells me were in going wrong with this?

 

Thanks


Viewing all articles
Browse latest Browse all 216047

Trending Articles



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