Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
Sign up nowGet Fabric certified for FREE! Don't miss your chance! Learn more
Hi folks, i am playing around the DAX and came across this issue. So the calculated column should return the case number of last day of the same county. It works fine for the first few rows but the stops changing after. But if I returned the date, it works prefect. Why would this happened? Please advised. Thank you!
Solved! Go to Solution.
please try this
Column =
VAR _date=MAXX(FILTER('Table','Table'[countryFIPS]=EARLIER('Table'[countryFIPS])&&'Table'[State]=EARLIER('Table'[State])&&'Table'[date]<EARLIER('Table'[date])),'Table'[date])
return MAXX(FILTER('Table','Table'[countryFIPS]=EARLIER('Table'[countryFIPS])&&'Table'[State]=EARLIER('Table'[State])&&'Table'[date]=_date),'Table'[cases])Proud to be a Super User!
please try this
Column =
VAR _date=MAXX(FILTER('Table','Table'[countryFIPS]=EARLIER('Table'[countryFIPS])&&'Table'[State]=EARLIER('Table'[State])&&'Table'[date]<EARLIER('Table'[date])),'Table'[date])
return MAXX(FILTER('Table','Table'[countryFIPS]=EARLIER('Table'[countryFIPS])&&'Table'[State]=EARLIER('Table'[State])&&'Table'[date]=_date),'Table'[cases])Proud to be a Super User!
Hi @ronlolololo ,
It is because your date column is ranking ascending,so using your expression can get the result you need,but if your date column is disordering,then you will get a wrong return,such as your case number.
The best solution is to create an index column.
I made a simple sample,pls see attached.
@ronlolololo - Difficult to say. Please first check if your issue is a common issue listed here: https://community.powerbi.com/t5/Community-Blog/Before-You-Post-Read-This/ba-p/1116882
Also, please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490
The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2.
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 62 | |
| 61 | |
| 41 | |
| 21 | |
| 18 |
| User | Count |
|---|---|
| 122 | |
| 117 | |
| 37 | |
| 34 | |
| 30 |