Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
I currently have the following IF statement to calculate the avg of the previous day's data if greater than 0.4. However, now I need to add a high limit of 2. So really I want it to take the avg of all values between 0.4 and 2. However, I am getting an error messge that "Too many arguments were passed to the AVERAGEX function. The maximum argument count for the function is 2."
Here is my formula with just the lower limit.
Solved! Go to Solution.
You cannot use if statement as the expression. To get the average between of all values between 0.4 and 2, try add the conditions in the filters:
CALCULATE(AVERAGE('Kw/ton'[Chiller7_KW_Ton_value (kW)]),FILTER('Kw/ton','Kw/ton'[Chiller7_KW_Ton_value (kW)]>0.4 && 'Kw/ton'[Chiller7_KW_Ton_value (kW)]< 2),FILTER('Kw/ton','Kw/ton'[Date]= EARLIER('Kw/ton'[Date])))
Paul Zheng
You cannot use if statement as the expression. To get the average between of all values between 0.4 and 2, try add the conditions in the filters:
CALCULATE(AVERAGE('Kw/ton'[Chiller7_KW_Ton_value (kW)]),FILTER('Kw/ton','Kw/ton'[Chiller7_KW_Ton_value (kW)]>0.4 && 'Kw/ton'[Chiller7_KW_Ton_value (kW)]< 2),FILTER('Kw/ton','Kw/ton'[Date]= EARLIER('Kw/ton'[Date])))
Paul Zheng
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
29 | |
28 | |
23 | |
22 | |
20 |
User | Count |
---|---|
55 | |
36 | |
28 | |
24 | |
21 |