Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hello,
I'm trying to create a column chart for Days Since Event, filtered by states. I have four states to filter through. I know I need to use the DateDiff function, but I'm having a problem filtering by a particular state. Any advice?
Solved! Go to Solution.
Hi @cborde3 ,
I created a sample pbix file(see the attachment), please check if that is what you want.
Measure = DATEDIFF(MIN('Table'[Incident Date]),TODAY(),DAY)
If the above one can't help you, could you please provide more raw data in your tables (exclude sensitive data) with Text format, your column chart field settings and your expected result with backend logic and special examples? It would be helpful to find out the solution. You can refer the following links to share the required info:
How to provide sample data in the Power BI Forum
How to Get Your Question Answered Quickly
And It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.
How to upload PBI in Community
Best Regards
Hi @cborde3 ,
I created a sample pbix file(see the attachment), please check if that is what you want.
Measure = DATEDIFF(MIN('Table'[Incident Date]),TODAY(),DAY)
If the above one can't help you, could you please provide more raw data in your tables (exclude sensitive data) with Text format, your column chart field settings and your expected result with backend logic and special examples? It would be helpful to find out the solution. You can refer the following links to share the required info:
How to provide sample data in the Power BI Forum
How to Get Your Question Answered Quickly
And It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.
How to upload PBI in Community
Best Regards
Thank you. This resolved it.
@cborde3 , Not very clear, But earlier can help
Power BI DAX- Earlier, I should have known Earlier: https://youtu.be/CVW6YwvHHi8
You can get the last date and take diff
new column =
var _max = maxx(filter(table, [Pcrs reference] = earlier([Pcrs reference]) && [Date]< earlier([Date]) ), [Date])
return
datediff(_max, [Date], day)
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 9 | |
| 9 | |
| 8 | |
| 6 | |
| 5 |
| User | Count |
|---|---|
| 23 | |
| 16 | |
| 15 | |
| 14 | |
| 8 |