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 All,
Can someone help me formulate a DAX expression for the following criteria. I've tried and for some reason it is not showing what I want
So I have a date column and a category column
I want the AVERAGE of days between "date column" date and today with a filter from "category column"
Hope someone can help me. Thank you.
Solved! Go to Solution.
Create two calculated columns:
Days from Today = TODAY() - 'Table'[Start Date]
The second calculated column as follows:
Average = CALCULATE ( AVERAGEX ( 'Table' , 'Table'[Days from Today] ) , ALLEXCEPT ( 'Table' ,'Table'[Category] ) )
Output will be similar to below:
Hope this helps 🙂
Theo
If I have posted a response that resolves your question, please accept it as a solution to formally close the post.
Also, if you are as passionate about Power BI, DAX and data as I am, please feel free to reach out if you have any questions, queries, or if you simply want to connect and talk to another data geek!
Want to connect?www.linkedin.com/in/theoconias
Hi,
Create a calculated column formula
Days between = today()-data[Date]
To your Table visual, drag Category and this measure
Average days between = average(data[days between])
Hope this helps.
Create two calculated columns:
Days from Today = TODAY() - 'Table'[Start Date]
The second calculated column as follows:
Average = CALCULATE ( AVERAGEX ( 'Table' , 'Table'[Days from Today] ) , ALLEXCEPT ( 'Table' ,'Table'[Category] ) )
Output will be similar to below:
Hope this helps 🙂
Theo
If I have posted a response that resolves your question, please accept it as a solution to formally close the post.
Also, if you are as passionate about Power BI, DAX and data as I am, please feel free to reach out if you have any questions, queries, or if you simply want to connect and talk to another data geek!
Want to connect?www.linkedin.com/in/theoconias
@punksterz626, both solutions provided by @Ashish_Mathur and myself will hopefully provide the outcome you're after. However, just to provide an explanation between primary difference between the two solutions is presented in the below table visual:
Hopefully this shows the difference between AVERAGEX and AVERAGE as well, in the power the "X" function holds.
All the best and hope the above makes sense.
Theo 🙂
If I have posted a response that resolves your question, please accept it as a solution to formally close the post.
Also, if you are as passionate about Power BI, DAX and data as I am, please feel free to reach out if you have any questions, queries, or if you simply want to connect and talk to another data geek!
Want to connect?www.linkedin.com/in/theoconias
Can this be done as a measure or does it have to be calculated columns? If i were to use the result with the Card visual does it matter which average i use?
Use Calculated columns in this instance as the syntax works. You can certainly use the Card visual. It will just give an average on the entire set of data. But you can then use the Filter pane of the visual to select what filters you want to include or exclude on your categories.
If I have posted a response that resolves your question, please accept it as a solution to formally close the post.
Also, if you are as passionate about Power BI, DAX and data as I am, please feel free to reach out if you have any questions, queries, or if you simply want to connect and talk to another data geek!
Want to connect?www.linkedin.com/in/theoconias
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!