Forum Discussion
How to compare data at 2 different dates
- Anonymous4 years ago
Hi Sylvain74 ,
I updated your sample pbix file(see attachment), please check whether it can get your expected result.
1. Update the formula of measure [Scenario - Delivered Quantity ] as below
Scenario - Delivered Quantity = VAR _selactdates = ALLSELECTED ( 'Scenario Actual Date'[VALUATION_DATE] ) VAR _selscedates = ALLSELECTED ( 'Scenario Dates'[VALUATION_DATE] ) RETURN CALCULATE ( SUM ( 'Contract Deliveries'[DeliveredQuantity] ), FILTER ( 'Contract Deliveries', 'Contract Deliveries'[ValuationDate] IN _selactdates || 'Contract Deliveries'[ValuationDate] IN _selscedates ) )2. Create a new measure as below to get the sum of contract quantity
Scenario - ContractQuantity = VAR _selactdates = ALLSELECTED ( 'Scenario Actual Date'[VALUATION_DATE] ) VAR _selscedates = ALLSELECTED ( 'Scenario Dates'[VALUATION_DATE] ) RETURN CALCULATE ( SUM ( 'Contract Deliveries'[ContractQuantity] ), FILTER ( 'Contract Deliveries', 'Contract Deliveries'[ValuationDate] IN _selactdates || 'Contract Deliveries'[ValuationDate] IN _selscedates ) )Best Regards
Hi Guys,
Thank you both for your help. Based on your examples, I will be able to create some measures based on the data at date 1 and date 2.
However I need as well to display as well the details of those data at date 1 in a table and at date 2 in another table. And on that point I still have a doubt.... How can I display those information if the date tables are disconnected from the fact table?
- lbendlin4 years agoSuper User
Use the respective date tables as the basis and add the measures you created for either scenario.
- Sylvain744 years agoHelper III
I understand that I can create measure which will react according to each disconnected time tables used in the slicers. But I don't see how the records of the fact table will be displayed.
I can have records present at t1 which are not present at t2, or vice versa and I can have records present in both snapshots t1 and t2.