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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
jeffbartuch
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.

 

Jeff

 

@cardvisual, @dax, @aggregatefunction

 

1 REPLY 1
lbendlin
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.
https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...
Please show the expected outcome based on the sample data you provided.

https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

Check out the February 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.