The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Hi,
Can anyone help. I'm trying to get this formula to run and I keep getting this error message:
Too many arguments were passed to the DATESBETWEEN function. The maximum argument count for the function is 3.
The formula is:
c_ARGB = IF([ARG A]="",0,
IF([ARG D]="",CALCULATE(SUM(DateTable[WORKDAY]),DATESBETWEEN(DateTable[Date],'IC CMS List'[ARG A],TODAY(),CALCULATE(SUM(DateTable[WORKDAY]),DATESBETWEEN(DateTable[Date],'IC CMS List'[ARG A],'IC CMS List'[ARG D]))))))
Thanks!
Solved! Go to Solution.
I believe you want:
c_ARGB = IF( [ARG A]="", 0, IF( [ARG D]="", CALCULATE( SUM(DateTable[WORKDAY]), DATESBETWEEN( DateTable[Date], 'IC CMS List'[ARG A], TODAY() ) ), CALCULATE( SUM(DateTable[WORKDAY]), DATESBETWEEN( DateTable[Date], 'IC CMS List'[ARG A], 'IC CMS List'[ARG D] ) ) ) )
I believe you want:
c_ARGB = IF( [ARG A]="", 0, IF( [ARG D]="", CALCULATE( SUM(DateTable[WORKDAY]), DATESBETWEEN( DateTable[Date], 'IC CMS List'[ARG A], TODAY() ) ), CALCULATE( SUM(DateTable[WORKDAY]), DATESBETWEEN( DateTable[Date], 'IC CMS List'[ARG A], 'IC CMS List'[ARG D] ) ) ) )
OMG Greg, Thank you!!! I've been banging my head against a wall regarding this solution for a month now.
I noticed that in my original formula everything was on the same line. However, I cannot find out where to go so that I can enter the forumla on separate lines. The area that I insert my formulas doesn't allow me to enter formulas on seperate lines.
As a result, I tried to modify my formula to match yours but still on one line and I still got an error message.
What was I doing wrong? and where can I go to practice so that I can get better?
Alt-Enter is your friend. That sends you to a new line within the DAX editing window. Or you can just copy and paste my formula.
Thanks. I utilized the copy and paste keyboard shortcut and copied your solution. I'm still amazed. Again thanks.
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the August 2024 Power BI update to learn about new features.
User | Count |
---|---|
109 | |
76 | |
65 | |
52 | |
51 |
User | Count |
---|---|
128 | |
117 | |
78 | |
65 | |
63 |