Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi Everybody,
ı have an ıssue about date . ı am tryıng to calculate order sales for respective dates. such as below;
productıd | total sales-01.01.2021 | total sales-01.02.2021 | total sales-01.03.2021 |
1 | 100 | 1000 | 5000 |
2 | 200 | 150 | 2000 |
3 | 300 | 450 | 3000 |
4 | 800 | 800 | 4500 |
ı have an date filter which is equal to 'Dim_Date'[date] . when ı select 01.01.2021 as date filter, ı want to see to 01.02.2021, 01.03.2021 respectively in fields. so when ı try to add one month to measure ı fail. could you help please?
measure:
TotalSales = CALCULATE(
SUM('order'[sales])
,FILTER('Dim_Date'[date] <= ['sales'[date]))
note: ı tryed datediff and dateadd but ıt doesnt work ı dont know why.
Hi @Trist,
Could you provide your pbix file after removing sensitive information?
Maybe you can change data structure in query editor and the apply the measure.
Best Regard,
Link
is your table structure same as shown above?
I think it would be best if we have table structure as below
Product Id Date Sales
1 01.01.2021 100
1 01.02.2021 200
1 01.03.2021 500
then you can make connection with date table and have filtering like you wanted.
Does this make sense?
Proud to be a Super User!
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
112 | |
97 | |
85 | |
67 | |
59 |
User | Count |
---|---|
150 | |
120 | |
100 | |
87 | |
68 |