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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
Act_Nico
Frequent Visitor

The values from same period last year come in blank

Hello friends, I would like to generate data from the same period last year in the same record of the current year. The problem is that I need to summarize the base table to then calculate the average of the required field:

 

TEST =

VAR Var_A =

        SUMMARIZE(DATA

                , DATA[NUMPOL]

                , DATA[MES_INI]

                , DATA[MES_FIN]

                ,"Prime"

                , CALCULATE(

                        SUM(DATA[Prime])

                        ,SAMEPERIODLASTYEAR(Calendario[Date]))

        )

VAR Var_B =

        AVERAGEX(Var_A,[Prime])

 

RETURN Var_B

 

But the result generates a blank column of values

 

I am quite rookie on DAX functions and I would like some help please

2 REPLIES 2
Dangar332
Super User
Super User

hi, @Act_Nico 

 

add Calendario[Date]) column to your summarize in var_A

Hi @Dangar332 , I couldn't add that column, it's weird because I have a many-to-many relationship between both tables

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 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.