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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
dinesharivalaga
Helper III
Helper III

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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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

Top Kudoed Authors