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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
dinesharivalaga
Helper II
Helper II

Average of last 6 months data in cards

Hi All ,

 

I am getting error message below when i am using Averagex DAX for my scenario.

I want to get the average values in card visual from the last 6 months data in line chart.

Below the error message and the data visuals (the one with title of Project Code Creations)

 

dinesharivalaga_0-1711689299511.png

Please help to fix this issue for me 😞 

Good Friday .. TIA 🙂

 

TR

Dinesh

 

2 ACCEPTED SOLUTIONS
Dangar332
Super User
Super User

hi, @dinesharivalaga 

in your datesinperiod update like below

 

=
datesinperiod(
    'PA-GLOBAL LANDING PAGE'[MONTH],
     MAX('PA-GLOBAL LANDING PAGE'[MONTH]),
     -6,
     MONTH
)

 

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

View solution in original post

isha_7
Regular Visitor

Hello @dinesharivalaga ,

 

If you want to get the average values in card visual, use AVERAGE instead of AVERAGEX.

 

Here is the code for that.

isha_7_0-1711692023413.png

Replace 'financial[Sales Price]' with '[Total project code creation]' 

       and 'financial[Date]' with '[Your date column].

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

View solution in original post

2 REPLIES 2
isha_7
Regular Visitor

Hello @dinesharivalaga ,

 

If you want to get the average values in card visual, use AVERAGE instead of AVERAGEX.

 

Here is the code for that.

isha_7_0-1711692023413.png

Replace 'financial[Sales Price]' with '[Total project code creation]' 

       and 'financial[Date]' with '[Your date column].

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

Dangar332
Super User
Super User

hi, @dinesharivalaga 

in your datesinperiod update like below

 

=
datesinperiod(
    'PA-GLOBAL LANDING PAGE'[MONTH],
     MAX('PA-GLOBAL LANDING PAGE'[MONTH]),
     -6,
     MONTH
)

 

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

Helpful resources

Announcements
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

Top Solution Authors