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 everyone,
I created a measure in DAX with the calculate function. It counts all orders but filters the date to be equal to or greater than 20. January. This means that the measure counts all orders between 20 and 30 January. This works fine but inside my report, I have a date slicer where you can slice all days in this current month (1 to 30 January). The problem is that the measure I created ignores the date slicer, so if I use the slicer to see from 1 January to 15 January then it shows the same number as 20 to 30 January. It should instead just show 0.
How can I fix this? And can anybody help? 🙂
Thank you
Solved! Go to Solution.
Try this
Orders (After 20 January) =
CALCULATE(COUNT('Table 1'[Order ID])filter('table 1','Table 1'[Coffee]="Yes"&& 'Table 1'[Created]>=DATE(2020;1;20)))/
CALCULATE(COUNT('Table 1'[Type]);filter('table 1','Table 1'[Type]="Espresso"
&& 'Table 1'[Created]>=DATE(2020;1;20)))
Share your current calculations. You might be using all on date column
@amitchandak @Anonymous
Orders (After 20 January) =
CALCULATE(CALCULATE(COUNT('Table 1'[Order ID]);'Table 1'[Coffee]="Yes")/
CALCULATE(COUNT('Table 1'[Type]);'Table 1'[Type]="Espresso");
'Table 1'[Created]>=DATE(2020;1;20))
Try this
Orders (After 20 January) =
CALCULATE(COUNT('Table 1'[Order ID])filter('table 1','Table 1'[Coffee]="Yes"&& 'Table 1'[Created]>=DATE(2020;1;20)))/
CALCULATE(COUNT('Table 1'[Type]);filter('table 1','Table 1'[Type]="Espresso"
&& 'Table 1'[Created]>=DATE(2020;1;20)))
@Anonymous Amazing!!!!
can you share your measure to see what's the issue?
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 |
---|---|
109 | |
99 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
102 | |
87 | |
64 |