Forum Discussion
pfernandez
3 years agoNew Member
Hasonevalue not working
I have a field name called Dr_Cr_Balance, which only has one value in the Chart of Accounts table. In the following expression I am testing to see if Hasonevalue = "debit" or "credit". If "debit, I w...
pfernandez
3 years agoNew Member
Hi Amitchandak, I tried this and I probably have a mistake somewhere in the formula. Can you take a look and help me fix this?
pfernandez
3 years agoNew Member
It looks like i was missing a comma in the second CALCULATE function. I added the comma and now I have this:
YTD Actual = CALCULATE(1 * [Amount $], FILTER(Chart_of_Accounts, Chart_of_Accounts[Dr_Cr_Balance] - "debit") + CALCULATE (-1 * [Amount $], FILTER(Chart_of_Accounts, Chart_of_Accounts[Dr_Cr_Balance] = "credit", DATESYTD('Date'[Date], "12/31"), ALL('Date'))))
I am not getting a message saying "too many arguments were passed to the FILTER function. The maximum argument count for the function is 2."
- pfernandez3 years agoNew Member
I am still looking for a solution. Does anyone know how to fix the above DAX statement?