Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
I've been stuck with this problem for three days already. I've tested multiple date and time intelligence functions to store the output of today's month but all have failed. What I want to happen is that regardless of what the value of the Numerator and Denominator is in the succeeding months, the output to be shown in the succeeding months should be the same as the output given on today's month. For example, since the month today is May 2025, I want the output of Numerator/Denominator in the succeeding months to be the same. Something like the sample shown in the image.
Summary of the premise:
Today is May
For the month of May, and previous, I want Output = Numerator/Denominator.
For any month after May I want Output = 67.16%
General case:
If Date Period is equal to or prior to Current Period, Output = Numerator/Denominator. Else;
If Date Period is after Current Period, Output = Numerator of Current Period/Denominator of Current Date Period
Solved! Go to Solution.
I suggest using the DAX formula below:
FixedOutputMeasure =
VAR CurrentMonth = EOMONTH(TODAY(), 0)
VAR SelectedMonth = MAX('Date'[Date])
VAR ThisMonthNumerator =
CALCULATE(
SUM('Table'[Numerator]),
'Date'[Date] <= CurrentMonth,
EOMONTH('Date'[Date], 0) = CurrentMonth
)
VAR ThisMonthDenominator =
CALCULATE(
SUM('Table'[Denominator]),
'Date'[Date] <= CurrentMonth,
EOMONTH('Date'[Date], 0) = CurrentMonth
)
VAR NormalNumerator = SUM('Table'[Numerator])
VAR NormalDenominator = SUM('Table'[Denominator])
RETURN
IF(
EOMONTH(SelectedMonth, 0) <= CurrentMonth,
DIVIDE(NormalNumerator, NormalDenominator),
DIVIDE(ThisMonthNumerator, ThisMonthDenominator)
)
This formula checks whether the current row’s month is before or equal to May 2025 (or the current month).
If it is → it calculates the usual Numerator / Denominator.
If it’s a future month → it keeps showing the result from May 2025.
Let me know if you'd like to adjust it to work with a slicer instead of TODAY(), or if you're working with measures instead of columns.
If it solves your issue, feel free to mark it as the accepted solution so others can benefit as well. And if you found it helpful, a thumbs-up is always appreciated!
Hi @tricloro9898 ,
I wanted to follow up and see if you’ve had a chance to review the information provided here.
If any of the responses helped solve your issue, please consider marking it "Accept as Solution" and giving it a 'Kudos' to help others easily find it.
Let me know if you have any further questions!
I suggest using the DAX formula below:
FixedOutputMeasure =
VAR CurrentMonth = EOMONTH(TODAY(), 0)
VAR SelectedMonth = MAX('Date'[Date])
VAR ThisMonthNumerator =
CALCULATE(
SUM('Table'[Numerator]),
'Date'[Date] <= CurrentMonth,
EOMONTH('Date'[Date], 0) = CurrentMonth
)
VAR ThisMonthDenominator =
CALCULATE(
SUM('Table'[Denominator]),
'Date'[Date] <= CurrentMonth,
EOMONTH('Date'[Date], 0) = CurrentMonth
)
VAR NormalNumerator = SUM('Table'[Numerator])
VAR NormalDenominator = SUM('Table'[Denominator])
RETURN
IF(
EOMONTH(SelectedMonth, 0) <= CurrentMonth,
DIVIDE(NormalNumerator, NormalDenominator),
DIVIDE(ThisMonthNumerator, ThisMonthDenominator)
)
This formula checks whether the current row’s month is before or equal to May 2025 (or the current month).
If it is → it calculates the usual Numerator / Denominator.
If it’s a future month → it keeps showing the result from May 2025.
Let me know if you'd like to adjust it to work with a slicer instead of TODAY(), or if you're working with measures instead of columns.
If it solves your issue, feel free to mark it as the accepted solution so others can benefit as well. And if you found it helpful, a thumbs-up is always appreciated!
Hi @tricloro9898 ,
I was able to achieve this using the following DAX measure output:
Output % =
VAR CurrentPeriod =
CALCULATETABLE (
TestTable,
MONTH(TestTable[Date]) = MONTH(TODAY()) &&
YEAR(TestTable[Date]) = YEAR(TODAY())
)
VAR CurrentNumerator =
MAXX (CurrentPeriod, TestTable[Numerator])
VAR CurrentDenominator =
MAXX (CurrentPeriod, TestTable[Denominator])
VAR CurrentOutput =
DIVIDE (CurrentNumerator, CurrentDenominator)
RETURN
IF(
MAX(TestTable[Date]) <= EOMONTH(TODAY(), 0),
DIVIDE(MAX(TestTable[Numerator]), MAX(TestTable[Denominator])),
CurrentOutput
)
Here is a screenshot of how my Power BI visual looks with this measure applied to your sample data:
Please let me know if this works on your end!
If this helped, please mark it as the solution so others can benefit too. And if you found it useful, kudos are always appreciated.
Thanks,
Samson
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
11 | |
11 | |
10 | |
9 | |
8 |
User | Count |
---|---|
17 | |
12 | |
11 | |
11 | |
11 |