Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
Anonymous
Not applicable

average based on date slicer

hi dears

 

i need to get the average of transactins based on date slicer

 

currently i inserted a visual card which will show me the count of transactions per date slicer and it works fine

 

but i dont know what should i do to get the average of ( counted transactions per date slicer )

 

 

angle_Fbi_0-1719907142484.png

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous ,

I have tested @sudhisami_azure 's solution and there is no error, here is the test results:

Total = COUNT('Table'[Count])
Average = AVERAGEX(VALUES('Table'[Date]), [Total])

vjunyantmsft_0-1720666731798.png

60 / 28 =2.14285......

Or you can try:

Average 2 = 
VAR _Date = DISTINCTCOUNT('Table'[Date])
RETURN
[Total] / _Date

vjunyantmsft_1-1720667076414.png


If you still can't implement it, then there is a problem with your data structure and not with DAX, as @ryan_mayu  said, please provide sample data or a pbix file.

Best Regards,
Dino Tao
If this post helps, then please consider Accept both of the answers as the solution to help the other members find it more quickly.

View solution in original post

7 REPLIES 7
Anonymous
Not applicable

Hi @Anonymous ,

I have tested @sudhisami_azure 's solution and there is no error, here is the test results:

Total = COUNT('Table'[Count])
Average = AVERAGEX(VALUES('Table'[Date]), [Total])

vjunyantmsft_0-1720666731798.png

60 / 28 =2.14285......

Or you can try:

Average 2 = 
VAR _Date = DISTINCTCOUNT('Table'[Date])
RETURN
[Total] / _Date

vjunyantmsft_1-1720667076414.png


If you still can't implement it, then there is a problem with your data structure and not with DAX, as @ryan_mayu  said, please provide sample data or a pbix file.

Best Regards,
Dino Tao
If this post helps, then please consider Accept both of the answers as the solution to help the other members find it more quickly.

Anonymous
Not applicable

thank you for your help

i just checked the file and it does not work( my file contain a query which i get it form my sharepoint website)

 

 but when i created a new report ( improt from excel ) it work excalty like what you attached

 

so just for my knowledge what you think the issue is from ?  unfortuntly i cant attached the file here because it contains some sensitive informatiomn related to my duty

sudhisami_azure
Frequent Visitor

Hi,

If you have Sales, Date tables, you can try like this:

CountOfSales = COUNT(Sales[SalesID])
AverageSalesTransactions = AVERAGEX(VALUES(Date[Date]), [CountOfSales])

Anonymous
Not applicable

its not working as well

 

what i need to do is get this value and put it into visual card

 

angle_Fbi_0-1719917268042.png

 

 

 

this calculation is based on total transactions 879 / 23 days ( as per submitted date slicer )

 

it can be done easly by using clustered column ( but i need it to be shown in card visual )

could you pls provide some sample data or pbix file?





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




ryan_mayu
Super User
Super User

@Anonymous 

 

maybe you can try this

 

avearge= total transactions / datediff((min(submitted date),max(submitted date),day)





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Anonymous
Not applicable

it is not working brother

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.