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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
SoyeFBI
New Member

DAX for a Fraction that changes with respect to Numerator & Denominator:

I need help in creating a DAX that changes once we have both the numerator and denominator for a Month.

 

Reconciliation Factor April  = Numerator/Denominator;

 

So for May; I want the Reconciliation Fatcor to change once I update Numerator and Denominator as the current Reconciliation Factor.

so this is the DAX i use at the moment:

Latest_RF = CALCULATE('RF Dashboard'[RF_DEF],'Date'[Year]=2023 && 'Date'[Month]="Apr-2023")
 
where,
RF_DEF = IF(ISBLANK(CALCULATE(DIVIDE([TOTAL_A],1000*[TOTAL_B]))),0,CALCULATE(DIVIDE([TOTAL_B],1000*[TOTAL_A])))

 

 

MonthABRF (%)
Jan-20232000015000 75%
Feb-2023300001000033%
Mar-2023250001500060%
Apr-2023150001000067%

 

How can I modify this DAX so at any filter it shows the latest RF? that is if values (A&B) are entered for May-2023, it automatically shows the latest RF.

Latest_RF = CALCULATE('RF Dashboard'[RF_DEF],'Date'[Year]=2023 && 'Date'[Month]="Apr-2023")

3 REPLIES 3
SoyeFBI
New Member

How can I dynamically create the variable for last month that changes with time?

Latest_RF =
var maxmonth= maxx('Table',[Month])
return calculate(max('Table'[RF (%)]),'Table'[Month]=maxmonth)
lbendlin
Super User
Super User

Before you calculate Latest_RF  you add a step to assign a variable to the latest month with data. Then use that variable in your CALCULATE filters.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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