Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
I'm trying to create a calculated column to return the current quarter like I do for current month. I use these mostly as a visualization filter so the report updates to the current information.
This is the formula I use for Current Month:
CurrentMonth = IF(YEAR('LST Report'[EffectiveDate])&MONTH('LST Report'[EffectiveDate])=YEAR(NOW())&MONTH(NOW()),1,0)
This is what I'm trying for Current Quarter, it is not working as I would expect.
CurrentQuarter = IF(YEAR('LST Report'[EffectiveDate])&MONTH('LST Report'[EffectiveDate]+2/3)=YEAR(NOW())&MONTH(NOW()+2/3),1,0)
Any thoughts are appreciated
Solved! Go to Solution.
Hi Caitlin_Knox
i guess you enter this formula in a date table and you want to add a column what shows you 1 if the date is the current quater. In this case i added before a quaternumber column:
QuaterNumber = if(dim_Date[Year] = year(now());roundup(dim_Date[MonthNumberOfYear]/3;0);0) and then
Current QTD = if(dim_Date[QuaterNumber] = roundup(month(now()-1)/3;0);1;0)
That works for me fine, maybe it helps you also.
KR
Florian
You can calculate the current Quarter Sales using below DAX:
You can also use following expression to get the Quarter number.
Quarter Number = INT(FORMAT(NOW(),"q"))
Regards,
Hi Caitlin_Knox
i guess you enter this formula in a date table and you want to add a column what shows you 1 if the date is the current quater. In this case i added before a quaternumber column:
QuaterNumber = if(dim_Date[Year] = year(now());roundup(dim_Date[MonthNumberOfYear]/3;0);0) and then
Current QTD = if(dim_Date[QuaterNumber] = roundup(month(now()-1)/3;0);1;0)
That works for me fine, maybe it helps you also.
KR
Florian
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
108 | |
98 | |
79 | |
66 | |
60 |
User | Count |
---|---|
148 | |
113 | |
97 | |
84 | |
67 |