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

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.

Reply
ebeauchamp
Helper I
Helper I

Make a column value available in a measure

Hi,
With the following post I was able to add a column to the Dates table, in order to have the number of days in the current month:
https://community.powerbi.com/t5/DAX-Commands-and-Tips/Days-in-Current-Month/m-p/1214980#M19604

Now, I would like to use this value as a variable in another measure. For example, the measure below had the number of days (30 for November) typed in manually: 

RevthisMonth-PRJNRMUsg = [RevthisMonth-MTDNRMUsg]/[Yesterday]*30

I want to replace this 30 by the variable which is now calculated in the Dates table. But don't know how to relate to it, since I can only refer to other measures, not to a specific table column, in that format. 

Thanks for your help!

1 ACCEPTED SOLUTION
wdx223_Daniel
Super User
Super User

RevthisMonth-PRJNRMUsg = [RevthisMonth-MTDNRMUsg]/[Yesterday]*max(dates[days in month])

@ebeauchamp 

View solution in original post

2 REPLIES 2
ebeauchamp
Helper I
Helper I

Thanks so much, works perfectly with this max function.

wdx223_Daniel
Super User
Super User

RevthisMonth-PRJNRMUsg = [RevthisMonth-MTDNRMUsg]/[Yesterday]*max(dates[days in month])

@ebeauchamp 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors