The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
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.
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
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
Quarter =
VAR _monthno =
MONTH ( 'Date'[Date] )
VAR _result =
SWITCH (
TRUE (),
_monthno <= 3 = "Q3",
_monthno <= 6 = "Q4",
_monthno <= 9 = "Q1", "Q2"
)
RETURN
_result
Thanks for your quick response.
But i want to know what is wrong in my above dax quarter function? system is giving error. i want to rectify said error please. if you are able to let me know issue with above formula, it will be of great help for me.
Thanks & Regards,
Ashshiv_123
User | Count |
---|---|
14 | |
11 | |
8 | |
6 | |
5 |
User | Count |
---|---|
28 | |
19 | |
13 | |
8 | |
5 |