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 all, im trying to create a measure that would count all rows where the column date is 1st day of next month however im getting an error when using the CALCULATE function.
"A function "CALCULATE" has been used in a true or false expression that is used as a table filter expression. This is not allowed."
Thank you in advance
Hi @georgec96
Thanks for reaching out to us.
I just want to confirm if you resolved this issue? If yes, you can accept the answer helpful as the solution or share you method and accept it as solution, thanks for your contribution to improve Power BI.
If you need more help, please let me know.
Best Regards,
Community Support Team _Tang
If this post helps, please consider Accept it as the solution to help the other members find it more quickly.
Hi @georgec96
please try
DK orders Left =
VAR NextMonth =
EOMONTH ( ebs_lcl_open_lines[order_due_date], 0 ) + 1
RETURN
CALCULATE (
COUNT ( ebs_lcl_open_orders[oracle_order_number] ),
ebs_lcl_open_orders[due_date] = NextMonth
)
@georgec96
Yes you can
DK orders Left =
VAR NextMonth =
EOMONTH ( MAX ( ebs_lcl_open_lines[order_due_date] ), 0 ) + 1
RETURN
CALCULATE (
COUNT ( ebs_lcl_open_orders[oracle_order_number] ),
ebs_lcl_open_orders[due_date] = NextMonth
)
Yes as there is no data for next month. You need to slice by or select date
column due_date containts the date 1st of july 2022 which is what I want to count.
I was hoping that the measure will return a count of all those rows where the due_date is 1st of july 2022
Ok then let's return nextmonth
DK orders Left =
VAR NextMonth =
EOMONTH ( MAX ( ebs_lcl_open_lines[order_due_date] ), 0 ) + 1
VAR Result =
CALCULATE (
COUNT ( ebs_lcl_open_orders[oracle_order_number] ),
ebs_lcl_open_orders[due_date] = NextMonth
)
RETURN
NextMonth
Hi @tamerj1 I have used the following formula
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 |
---|---|
47 | |
24 | |
20 | |
15 | |
13 |
User | Count |
---|---|
55 | |
48 | |
43 | |
19 | |
19 |