Forum Discussion

jeffbartuch's avatar
jeffbartuch
New Member
2 years ago

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