Forum Discussion
Calculate difference between two filtered measures
- 6 years ago
I think what you will need is 2 date lists, one linked to each field [Data Load Date] and [Historical Date]
You use the dates from those 2 tables in the slicers and write the measures so the [Data Load Amonut] ignores the filters from the 'Historical Dates' table and vice versa.
Total Amount = SUM ('Table'[Amount] )Data Load Amonut = CALCULATE( [Total Amount],ALL('Historical Dates') )Historical Amount = CALCULATE( [Total Amount],ALL('Data Load Dates') )Difference = [Data Load Amonut] - [Historical Amount]On both of the date slicers I also added a filter where [Total Amount] is not blank so that only dates with an amount would show in the list.
I have attached my sample file for you to look at so you can see how I made the two date tables.
Campaign Type would be a completely sepereate filter that would have nothing to do with the dates. You would eaither want the Campaign Type as a column in your main data table or have a Campaign table that has the field Campaign Type in it an that links to your main data table.