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.
Hello,
My weekly sales measure looks like this:
RWT Sales (week):=CALCULATE([Sales],'Order Date'[Date] >= TODAY()-6,'Order Date'[Date]<=TODAY())
It works fine when im combining it with customer data, but i would like to show it pr day in a visual. But when i use my order date table it looks like this (in a table):
And it continues through 2040 (which is the size of my 'order date' table. What am i doing wrong?
Solved! Go to Solution.
Hi @KristianS ,
I think you need to add filter in expression like below
RWT Sales (week):=CALCULATE([Sales],filter('Order Date','Order Date'[Date] >= TODAY()-6 && 'Order Date'[Date]<=TODAY()))
If this doesn't work, please check whether your order date table have relationship between your fact table(or measure [Sales]). You could inform me your data structure and your relationship.
Best Regards,
Zoe Zhi
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @KristianS ,
I think you need to add filter in expression like below
RWT Sales (week):=CALCULATE([Sales],filter('Order Date','Order Date'[Date] >= TODAY()-6 && 'Order Date'[Date]<=TODAY()))
If this doesn't work, please check whether your order date table have relationship between your fact table(or measure [Sales]). You could inform me your data structure and your relationship.
Best Regards,
Zoe Zhi
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thanks a lot! Addig Filter worked.
What does that do? I thought the calculate function automaticly add filters.
Try like
RWT Sales (week):=CALCULATE([Sales],filter('Order Date','Order Date'[Date] >= max('Order Date'[Date])-6 && 'Order Date'[Date]max('Order Date'[Date])))
with Date calendar
RWT Sales (week):=CALCULATE([Sales],filter('Date','Date'[Date] >= max('Date'[Date])-6 && 'Date'[Date]max('Date'[Date])))
Hi @KristianS
if you need running total day by day it is incorrect to compare dates with today() which is always the same for each row
try
RWT Sales (week):=CALCULATE([Sales],'Order Date'[Date] >= SELECTEDVALUE('Order Date'[Date]),'Order Date'[Date]<=SELECTEDVALUE('Order Date'[Date]))
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 |
---|---|
107 | |
100 | |
80 | |
63 | |
58 |
User | Count |
---|---|
148 | |
111 | |
94 | |
84 | |
67 |