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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
XaviOV
Helper V
Helper V

Graphic values last week and current week

Hi there,


I created a "Clustered column chart" and put the values ​​with relative filter for this week, but I would like to insert the values ​​for the last week.

How can you do it?

 

For look the current week I've created this measure:
FechaComienzoSemana = Electricidad[Fecha] - WEEKDAY(Electricidad[Fecha] ; 2)
For look the last week I've created this measure, but in the graphic appear the data of the current week
as if the formula didn't work.
Con_fil_ene_act -1semana producción =
        CALCULATE(
SUM('Electricidad'[Con_fil_ene_act Producción]);
            DATEADD('Electricidad'[Fecha].[Date]; -7; DAY)
)

-1week.png

Regards,


Xavi

1 ACCEPTED SOLUTION
v-kelly-msft
Community Support
Community Support

Hi  @XaviOV ,

 

Your measure needs to be modified as below:

 

Con_fil_ene_act -1semana producción = 
        CALCULATE(
SUM('Electricidad'[Con_fil_ene_act Producción]);
            DATEADD('Electricidad'[Fecha]; -7; DAY)
)

 

While using time intelligence function,you'd better not add .[date].

 

Best Regards,
Kelly
Did I answer your question? Mark my post as a solution!
 

View solution in original post

2 REPLIES 2
v-kelly-msft
Community Support
Community Support

Hi  @XaviOV ,

 

Your measure needs to be modified as below:

 

Con_fil_ene_act -1semana producción = 
        CALCULATE(
SUM('Electricidad'[Con_fil_ene_act Producción]);
            DATEADD('Electricidad'[Fecha]; -7; DAY)
)

 

While using time intelligence function,you'd better not add .[date].

 

Best Regards,
Kelly
Did I answer your question? Mark my post as a solution!
 
JosefPrakljacic
Solution Sage
Solution Sage

Hey @XaviOV,

 

here is an explanation video how to solve your problem. 

I could also just write the Measure, but I think it would be better if there was a solid explanation and Curbal is just good at it 🙂

 

Please don't forget to give a 👍 and accept the post as solution. (If it helped 😅)
Have a nice day!

BR,
Josef
Graz - Austria

View-my-LinkedIn-profile-image-3-300x140.png.png

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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