cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Reply
Anonymous
Not applicable

Current Day Card

Hello,

I need to add a simple card that gives the current day of the year (1 out of 365). I am deriving this column from a calander and everything seems to move smoothly until I add the field to the card and I end up with a count of the field or a sum. I think I need to create a measure that will filter the date table only to 'TODAY' so that I am returned the day of the year for that specific row.

I am not sure how I should structure this DAX formula, fairly new to the program.

Thank you!

Day of Year.JPG

1 ACCEPTED SOLUTION
jdbuchanan71
Super User
Super User

Try this measure.  I use a variable for TODAY to cut down on the ()

Day of Year = 
VAR TodayIs = TODAY()
RETURN DATEDIFF( DATE ( YEAR (TodayIs) , 1 , 1) , TodayIs , DAY)

day of year.jpg

View solution in original post

2 REPLIES 2
jdbuchanan71
Super User
Super User

Try this measure.  I use a variable for TODAY to cut down on the ()

Day of Year = 
VAR TodayIs = TODAY()
RETURN DATEDIFF( DATE ( YEAR (TodayIs) , 1 , 1) , TodayIs , DAY)

day of year.jpg

Anonymous
Not applicable

It works! You're awesome

Helpful resources

Announcements
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors