Forum Discussion

iabarraganc's avatar
iabarraganc
Icon for Helper I rankHelper I
7 years ago
Solved

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
  • iabarraganc's avatar
    iabarraganc
    7 years ago

    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.

3 Replies

    • iabarraganc's avatar
      iabarraganc
      Icon for Helper I rankHelper I

      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.

      • v-cherch-msft's avatar
        v-cherch-msft
        Icon for Microsoft Employee rankMicrosoft Employee

        Hi iabarraganc 

         

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

         

        Regards,
        Cherie