Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join 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.

Reply
tricloro9898
New Member

I want to retain current month's output to use as a value for all succeeding future months.

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.

tricloro9898_0-1748019884089.png

 

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

1 ACCEPTED SOLUTION
Ilgar_Zarbali
Most Valuable Professional
Most Valuable Professional

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!

View solution in original post

3 REPLIES 3
v-hashadapu
Community Support
Community Support

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!

 

Ilgar_Zarbali
Most Valuable Professional
Most Valuable Professional

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!

SamsonTruong
Impactful Individual
Impactful Individual

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:

SamsonTruong_0-1748040424467.png

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



Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.