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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
robarbie
Helper I
Helper I

How do I create a Dax formula with a date value as the denominator?

I have a requirment where the vendor wants a measure divded by the month number.

 

"Abs Perc of Error (Demand Forecast) / by the month number Example:  Jan Abs Perc of Error (Demand Forecast) / 1, Feb Abs Perc of Error (Demand Forecast) / 2, etc"

 

When I try to create the DAX Measure the date denominator will not poplulate or if I try to use Quick Measure it wants to add sum 

or another aggregation.

 

This a quick measure: 

Demand Forecast divided by MonthNum =
DIVIDE([Demand Forecast], SUM('DimDate'[MonthNum]))
 
Any guidance would be apprciated!
 
3 REPLIES 3
Nathaniel_C
Community Champion
Community Champion

Hi @robarbie , how is your month number column formatted? As a whole number?
Let me know if you have any questions.

If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos 👍are nice too.
Nathaniel





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Hi Nathaniel,

It is formatted as a whole number.

 

Thanks,

 

Rochelle

Hi @robarbie , since DAX needs to know which row to use in a table, it won't let you put in a "naked" column because there are multiple values.  I typically use MAX(), but most of the time you could use MIN() as well.  Since in a typical calculated column, the engine knows what row it is on the MAX() works fine.

 

Demand Forecast divided by MonthNum =
DIVIDE([Demand Forecast], MAX('DimDate'[MonthNum]))
Try this and let us know if it works.  If not, you may need to provide a bit more about your report.


Let me know if you have any questions.

If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos 👍are nice too.
Nathaniel





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




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.