Forum Discussion
please provide solution for below error
6 Replies
- nandukrishnavsCommunity Champion
- ashshiv_123Helper I
Thanks for your feedback.
Please give solution for second quarter formula error also.
i have to use both simultaneously. so will be able to try this solution only after getting solution for both.
Thanks
Ashshin_123
- nandukrishnavsCommunity Champion
Quarter = VAR _monthno = MONTH ( 'Date'[Date] ) VAR _result = SWITCH ( TRUE (), _monthno <= 3 = "Q3", _monthno <= 6 = "Q4", _monthno <= 9 = "Q1", "Q2" ) RETURN _result
- AnonymousNot applicable
Hi ashshiv_123 ,
Your mistake was caused by an error in your formulas:
The first screenshot:
1. Month[ ] function is wrong, Month() is correct
MONTH(<datetime>)2. Don't nest formulas too much, try use VAR variables
3. If there is more than one condition, try using the switch function
The second screenshot
The format function must have at least two parameters
FORMAT(<value>, <format_string>[, <locale_name>])Best regards,
Community Support Team_Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.- ashshiv_123Helper I
Ok. Thanks for providing solution to my issue.
Will try it and will let you know.
Regarding using VAR variables, thanks for guiding me. but i am still in begginers phase of self learning power BI. i have yet to reach that phase. will definitly apply your suggestion once i reach that stage. i am still doing R & D. many more to learn yet.
Once again thanks for your feedback.
Thanks & Regards,
ashshiv_123