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.
Hi Guys,
I have the below measurement. So far I have put a filter on it to only use data from "In this year", however I need it to be YTD.
I know there exits a "TOTALYTD". Can this be used somehow in my measurement?
Thank you for all help. Much appreciated. 🙂
Solved! Go to Solution.
In such a scenario you will want to add a TODAY() based filter. You can choose if you want to do this as a calculated column (which would required frequent, ie daily, refreshes of your import mode data source) or a measure if your data source is Direct Query.
Completion Rate =
Var CurrentYear = <calculation for year>
VAR OffTime =
Calculate (
Counta ('Performance Management'[CompletionStatus])
,'Performance Management'[CompletionStatus] = "Completed Off Time"
,'Performance Management'[Year]=CurrentYear
)
VAR OnTime =
CALCULATE(
COUNTA('Performance Management'[CompletionStatus])
,'Performance Management'[CompletionStatus] = "Completed On Time"
,'Performance Management'[Year]=CurrentYear
)
RETURN
Divide ( OnTime, OnTime + OffTime) + 0
Here would be one option.
Unfortunately that doesnt work. Syntax error.
If it did work I think this would still be current year? I need YTD
Thank you for your response.
Did you adjust the formula according to your column names?
Please explain the difference between"current" and "YtD".
Hi yes of course.
So "Current year" is all performance activities completed in this year. That means that some activities can already be completed for december. We are not in december yet, so I do not want to include these in my calculation.
As you probably are very aware PBI has the option to add date filters to the figures (ie. "In this year"). This shows all performance management activites also those completed already but schedueled for december.
I want PBI to just do the above measure from 1. of january 2021 till today.
Does that make sense?
In such a scenario you will want to add a TODAY() based filter. You can choose if you want to do this as a calculated column (which would required frequent, ie daily, refreshes of your import mode data source) or a measure if your data source is Direct Query.
Hi again,
It took me 2 min to create
" Today or Before = IF('Performance Management'[Deadline] <= TODAY(), True, False) "
Using my original formula and this as a filter with "True" plus my earlier "In this year" filter gives me the result I wanted.
Thank you so much. So easy. 🙂
Sounds like this might be the solution. I have refreshes on my dataset twice a day. I will try to read somemore and see if I can come up with a solution. Thank you for your assistance.
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 |
---|---|
110 | |
95 | |
76 | |
65 | |
51 |
User | Count |
---|---|
146 | |
109 | |
106 | |
88 | |
61 |