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 have written this formula which includes DatesMTD. However, it's showing an incorrect calculation.
Solved! Go to Solution.
For Quarter :-
Test =
CALCULATE (
SUM ( GOALS_CONSOLIDATED[MONTHLY_GOAL] ),
GOALS_CONSOLIDATED[GOAL_NAME] = "TRx (Dispensed) Count Goal",
GOALS_CONSOLIDATED[BRAND] = "ABC",
QUARTER( GOALS_CONSOLIDATED[Date] ) = QUARTER ( NOW () )
)
For year :-
CALCULATE (
SUM ( GOALS_CONSOLIDATED[MONTHLY_GOAL] ),
GOALS_CONSOLIDATED[GOAL_NAME] = "TRx (Dispensed) Count Goal",
GOALS_CONSOLIDATED[BRAND] = "ABC",
Year( GOALS_CONSOLIDATED[Date] ) = Year ( NOW () )
)
Best Regards,
Samarth
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin
Hi @Anonymous ,
Do you have calender table/date table which connected to GOALS_CONSOLIDATED table if yes then pass date column from calender/date table into DatesMTD function.
Thank you,
Samarth
Best Regards,
Samarth
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin
Tried what you said but it still isn't giving the correct answer
Can you try below code:-
Test =
CALCULATE (
SUM ( GOALS_CONSOLIDATED[MONTHLY_GOAL] ),
GOALS_CONSOLIDATED[GOAL_NAME] = "TRx (Dispensed) Count Goal",
GOALS_CONSOLIDATED[BRAND] = "ABC",
MONTH ( GOALS_CONSOLIDATED[Date] ) = MONTH ( NOW () )
)
Best Regards,
Samarth
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin
That's working. Can you tell me how the calcualtion would be for QTD and YTD?
For Quarter :-
Test =
CALCULATE (
SUM ( GOALS_CONSOLIDATED[MONTHLY_GOAL] ),
GOALS_CONSOLIDATED[GOAL_NAME] = "TRx (Dispensed) Count Goal",
GOALS_CONSOLIDATED[BRAND] = "ABC",
QUARTER( GOALS_CONSOLIDATED[Date] ) = QUARTER ( NOW () )
)
For year :-
CALCULATE (
SUM ( GOALS_CONSOLIDATED[MONTHLY_GOAL] ),
GOALS_CONSOLIDATED[GOAL_NAME] = "TRx (Dispensed) Count Goal",
GOALS_CONSOLIDATED[BRAND] = "ABC",
Year( GOALS_CONSOLIDATED[Date] ) = Year ( NOW () )
)
Best Regards,
Samarth
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin
Took some time to reply as I got pulled into a meeting but yes this works! Thankns!
@Anonymous Hard to say with the information provided. But I wouldn't use TI functions.
You may find this helpful - https://community.powerbi.com/t5/Community-Blog/To-bleep-With-Time-Intelligence/ba-p/1260000
Also, see if my Time Intelligence the Hard Way provides a different way of accomplishing what you are going for.
https://community.powerbi.com/t5/Quick-Measures-Gallery/Time-Intelligence-quot-The-Hard-Way-quot-TITHW/m-p/434008
Hi Greg, I went through the link you provided but didn't understand what you wanted to convey. If you have a solution for the month to date, can you write how the formula will be in my case? Thakns
In your 2nd link, I see a formula written for YTD but there's no formula for MTD and QTD 😞
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 |
---|---|
111 | |
94 | |
83 | |
67 | |
59 |
User | Count |
---|---|
151 | |
121 | |
104 | |
87 | |
67 |