cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
iabarraganc Frequent Visitor
Frequent Visitor

calendar calculate Table

Hi

I created a calendar table from the application. When you need to search for values from previous months, using this table the measurement does not work. But if I import a table with dates the formula works without problems

 

ww

 

This is an example

 

YearMonthChargesV_CALENDAR_FUNCTIONV_TABLE_DATE
2018January806806 
2018February10481048806
2018March111311131048
2018April123712371113
2018May6606601237
2018June25782578660
2018July118211822578
2018August5215211182
2018September416416521
2018October576576416
2018November914914576
2018December14411441914
2019January  1441

 

V_CALENDAR_FUNCTION =

CALCULATE(SUM(hechos[Charges]);PARALLELPERIOD(DIM_FECHA_2[FECHA]; -1; MONTH))

uses the calendar table that is created with the dax function CALENDAR(START_DATE, FINISH_DATE).

 

And V_TABLE_DATE uses the table that was created in excel and then imported into Power BI (

CALCULATE(SUM('hechos'[Charges]);dateadd(DIM_FECHAS[FECHA].[Date]; -1 ;month)))
 
Thansk for your help
1 ACCEPTED SOLUTION

Accepted Solutions
iabarraganc Frequent Visitor
Frequent Visitor

Re: calendar calculate Table

Thank you for your help. I tried in my file (in which you sent me works) does not work the calculation. Then I created a new file and used the function PARALLELPERIOD and there already the data were shown well.

View solution in original post

3 REPLIES 3
v-cherch-msft Super Contributor
Super Contributor

Re: calendar calculate Table

Hi @iabarraganc 

 

You may try below measure.Attached file for your reference.

Last Month = CALCULATE(SUM(Table3[Sales]),DATEADD('Date'[Date],-1,MONTH))

1.png

Regards,

Cherie

Community Support Team _ Cherie Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
iabarraganc Frequent Visitor
Frequent Visitor

Re: calendar calculate Table

Thank you for your help. I tried in my file (in which you sent me works) does not work the calculation. Then I created a new file and used the function PARALLELPERIOD and there already the data were shown well.

View solution in original post

v-cherch-msft Super Contributor
Super Contributor

Re: calendar calculate Table

Hi @iabarraganc 

 

Glad to hear you've solved it, please accept your reply as solution to close this thread.

 

Regards,
Cherie

Community Support Team _ Cherie Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Can You Solve These Challenge

Challenge: Can You Solve These?

Find out how to participate in the first Power BI 'Can You Solve These?' challenge.

Community News & Announcements

Community News & Announcements

Get your latest community news and announcements.

Virtual Launch Event

Microsoft Business Applications October Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

Community Kudopalooza

Win Power BI Swag with Community Kudopalooza!

Each week, complete activities and be qualified in the drawing for cool Power BI Swag.

Users Online
Currently online: 197 members 2,356 guests
Please welcome our newest community members: