Forum Discussion
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
- lbendlinSuper 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-Forum/ba-p/963216
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/1447523