cancel
Showing results for 
Search instead for 
Did you mean: 
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!
 

View solution in original post

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
PBI User Groups

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Get Ready for Power BI Dev Camp

Power BI Dev Camp - June 24th

Mark your calendars and join us for our next Power BI Dev Camp!

Top Solution Authors
Top Kudoed Authors