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.

New Member

DAX needed to create aggregate functions

I am trying to add a few card visuals to a dashboard.


I would like to show the value on yesterdays date, last week last day (Sunday), current month to date, last month (CES score the last day of the month), current quarter to date, last quarter (CES score the last day of the quarter), and year to date.


The data is kept in a PowerBI table by day. The name of the table is DailyScores. There is a date field, and a numeric (CES) field. I also have the date field linked to a a date field in a calendar table in this .pbix.


For example

Date        CES
9/1/2023        76.1
9/2/2023        77.0
9/3/3023         56.3


The CES field is what I am trying to aggregate. The value or score is in the table as a daily value. I'm not interested in calculating a SUM or average, but need the CES value of the last day of that specific period on the card visual. 


Any help would be appreciated.




@cardvisual, @dax, @aggregatefunction


Super User
Super User

Please provide sample data (with sensitive information removed) that covers your issue or question completely. Leave out anything not related to the issue.
Please show the expected outcome based on the sample data you provided.

Helpful resources

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.