Forum Discussion
How to Filter Using a Separate Table
- 11 months ago
Hi ,
For this I believe you do not need to have two calendar tables.
What I modeled was the following:
- Created a calendar table
- Needs to start at 1st of January of the minimum year and end at 31 of December of maximum year
- Be carefull to check the dates between both the sales and the baseline
- In this case the calendar goes from January 1st 2024 to 31st December 2024
- Create a one to many between the tables:
- Calendar - Baseline
- Calendar - Actual
- Create the measures below:
- AVG_Baseline_Sales = CALCULATE( AVERAGE(Baseline[Baseline Sales]), ALL('Calendar'[Date] )) AVG_Baseline_Sales2 = CALCULATE( AVERAGE(Baseline[Baseline Sales]) )Use the calendar table in your slicer
- Result below
The relationship will pick up the baselines corretly now you can also do a average of the sales and add the date to the visualization:
If you want to keep the average for the 5 days you can create a measure similar to this one:AVG_Baseline_Sales 3 = CALCULATE( AVERAGE(Baseline[Baseline Sales]), ALLSELECTED('Calendar'[Date] ))
Please see attach file.
- Created a calendar table
Hi powerlight1 ,
We haven’t heard from you on the last response and was just checking back to see if you have a resolution yet. And, if you have any further query do let us know.
Regards,
Dinesh
Hi @powerlight1 ,
We haven’t heard from you on the last response and was just checking back to see if you have a resolution yet. And, if you have any further query do let us know.
Regards,
Dinesh
- v-dineshya11 months agoCommunity Support
Hi @powerlight1 ,
We haven’t heard from you on the last response and was just checking back to see if you have a resolution yet. And, if you have any further query do let us know.
Regards,
Dinesh