Forum Discussion
Filter by date column data
Hi,
You can try it by creating a same column in sales Table by concatenating the "year + week of the year+ day of the week"
After this, create a relationship between the Tables using column [YWON]
We have created below two tables:
Table 1:
Table 2:
Now, create a column using below DAX Expression
YWON = CONCATENATE([SD].[Year],CONCATENATE(WEEKNUM([SD].[Date],1),WEEKDAY([SD]))-1)
Next step will be to create a Relationship between both Tables,
Add a Slicer Visual and add Year column of Table 1, as shown in the below screenshot.
As we have created a Relationship between two tables using [YWON] column, we can filter the data by [YWON]
Green : [YWON] sales Table
Red : [YWON] First Table
When last year is selected in the Slicer then, it is also filtering the Sales Table by the [YWON] (Because of the Relationship).
For the Calculation, you can use the Column Aggregation functions available in Power BI as shown in the below screenshot.
If this answer helps, please mark it as Accepted Solution so it would help others to find the solution.
Thanks!
Inogic Professional Services
An expert technical extension for your techno-functional business needs
Power Platform/Dynamics 365 CRM
Drop an email at [email protected]
Service: http://www.inogic.com/services/
Power Platform/Dynamics 365 CRM Tips and Tricks: http://www.inogic.com/blog/