Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago

Calculated column with DATEADD

Hi, new to Power BI.  I'm trying to create a Prior day measure and current day measure to calculate the difference in records processed (num_processed) in my data table over distinct events day over day. (Event name)

 

I'm using this measure but its still returning both prior day and current day.

 

 

13 Replies

  • PattemManohar's avatar
    PattemManohar
    Community Champion
    Anonymous Sample data in copiable format will be really helpful along with expected output. Also, it wasn't clear whether you are looking for Calculated Column or Measure. As you mentioned both in Title and Detail of the post.
  • Anonymous's avatar
    Anonymous
    Not applicable

    generated_id instance effective_date src_intfc_inst Feed Type receipt_date status_flag start_date end_date trimmed_end_date num_processed num_failed num_warnings num_fatals error_type sched_def_inst sched_queue_inst star_batch_id Run Date data_source_path Event Name
    1 503427 11/4/2018 0:00 42 CPA 11/4/2018 2:01 Y 11/4/2018 2:01 11/4/2018 2:01 11/4/2018 0:00 4374 0 0 0 X 34521 280824 11/4/2018 0:00 ISGFileShare\CFDS\trigger_prp_ca.txt ISGFileShare\CFDS\trigger_prp_ca.txt
    2 503428 11/4/2018 0:00 42 CPA 11/4/2018 2:25 Y 11/4/2018 2:25 11/4/2018 2:25 11/4/2018 0:00 0 0 0 0 34522 280825 11/4/2018 0:00 vpr1eagleapp01\EagleSystems\PACE\Server\Bloomberg\CPA1\prp_ca.txt_20181104022505.20181104 vpreagleapp\EagleSystems\PACE\Server\Bloomberg\CPA\prp_ca.txt_.
    3 503429 11/5/2018 0:00 42 SM2 11/5/2018 0:30 Y 11/5/2018 0:30 11/5/2018 0:33 11/5/2018 0:00 255 0 0 0 X 39518 280829 11/5/2018 0:00 ISGFileShare\CFDS\trigger_scd_idx_opt.txt ISGFileShare\CFDS\trigger_scd_idx_opt.txt
    4 503430 11/5/2018 0:00 42 SMF 11/5/2018 0:53 Y 11/5/2018 0:53 11/5/2018 0:53 11/5/2018 0:00 255 0 255 0 42881 280830 11/5/2018 0:00 vpr1eagleapp01\EagleSystems\PACE\Server\BLOOMBERG\SMF1\20181105005234__bbps_scd_idx_opt.txt.20181105 vpreagleapp\EagleSystems\PACE\Server\BLOOMBERG\SMF\__bbps_scd_idx_opt.txt.
    5 503431 11/5/2018 0:00 123 IOP 11/5/2018 0:54 Y 11/5/2018 0:54 11/5/2018 0:54 11/5/2018 0:00 297 0 0 0 X 34665 280831 11/5/2018 0:00 ISGFileShare\CFDS\IndexOptions_Price.txt ISGFileShare\CFDS\IndexOptions_Price.txt
    6 503432 11/5/2018 0:00 42 FIB 11/5/2018 1:50 Y 11/5/2018 1:50 11/5/2018 1:50 11/5/2018 0:00 15 0 0 0 X 41182 280832 11/5/2018 0:00 ISGFileShare\CFDS\trigger_scd_fi_bm.txt ISGFileShare\CFDS\trigger_scd_fi_bm.txt
    7 503433 11/5/2018 0:00 42 CPA 11/5/2018 2:01 Y 11/5/2018 2:01 11/5/2018 2:01 11/5/2018 0:00 4374 0 0 0 X 34521 280833 11/5/2018 0:00 ISGFileShare\CFDS\trigger_prp_ca.txt ISGFileShare\CFDS\trigger_prp_ca.txt
    8 503434 11/5/2018 0:00 42 CPA 11/5/2018 2:03 Y 11/5/2018 2:03 11/5/2018 2:03 11/5/2018 0:00 4374 0 0 0 X 34521 280834 11/5/2018 0:00 ISGFileShare\CFDS\trigger_prp_ca.txt ISGFileShare\CFDS\trigger_prp_ca.txt
    9 503435 11/5/2018 0:00 42 CPA 11/5/2018 2:04 Y 11/5/2018 2:04 11/5/2018 2:04 11/5/2018 0:00 4374 0 0 0 X 34521 280835 11/5/2018 0:00 ISGFileShare\CFDS\trigger_prp_ca.txt ISGFileShare\CFDS\trigger_prp_ca.txt
    10 503436 11/5/2018 0:00 42 CPA 11/5/2018 2:06 Y 11/5/2018 2:06 11/5/2018 2:06 11/5/2018 0:00 4374 0 0 0 X 34521 280836 11/5/2018 0:00 ISGFileShare\CFDS\trigger_prp_ca.txt ISGFileShare\CFDS\trigger_prp_ca.txt
    11 503437 11/5/2018 0:00 42 CPA 11/5/2018 2:08 Y 11/5/2018 2:08 11/5/2018 2:08 11/5/2018 0:00 4374 0 0 0 X 34521 280837 11/5/2018 0:00 ISGFileShare\CFDS\trigger_prp_ca.txt ISGFileShare\CFDS\trigger_prp_ca.txt
    12 503438 11/5/2018 0:00 42 SMF 11/5/2018 2:09 Y 11/5/2018 2:09 11/5/2018 2:09 11/5/2018 0:00 15 0 11 0 42881 280838 11/5/2018 0:00 vpr1eagleapp01\EagleSystems\PACE\Server\BLOOMBERG\SMF1\20181105020833__bbps_scd_fi_bm.txt.20181105 vpreagleapp\EagleSystems\PACE\Server\BLOOMBERG\SMF\__bbps_scd_fi_bm.txt.
    13 503439 11/5/2018 0:00 42 CPA 11/5/2018 2:21 Y 11/5/2018 2:21 11/5/2018 2:21 11/5/2018 0:00 33 0 0 0 34522 280839 11/5/2018 0:00 vpr1eagleapp01\EagleSystems\PACE\Server\Bloomberg\CPA1\prp_ca.txt_20181105022115.20181105 vpreagleapp\EagleSystems\PACE\Server\Bloomberg\CPA\prp_ca.txt_.
    14 503440 11/5/2018 0:00 123 DIV 11/5/2018 2:21 Y 11/5/2018 2:21 11/5/2018 2:21 11/5/2018 0:00 131 0 0 0 X 34523 280840 11/5/2018 0:00 ISGFileShare\CFDS\pace_div.txt ISGFileShare\CFDS\pace_div.txt
    15 503441 11/5/2018 0:00 123 SPL 11/5/2018 2:21 Y 11/5/2018 2:21 11/5/2018 2:21 11/5/2018 0:00 1 0 0 0 X 34524 280841 11/5/2018 0:00 ISGFileShare\CFDS\pace_spl.txt ISGFileShare\CFDS\pace_spl.txt
    16 503442 11/5/2018 0:00 110 TCD 11/5/2018 4:02 Y 11/5/2018 4:03 11/5/2018 4:04 11/5/2018 0:00 63 0 0 0 26682 280842 11/5/2018 0:00 vpr1eagleapp01\EagleSystems\PACE\Server\MARKIT\TCD1\20181105040229__TrancheCDSPrices_20181102.csv vpreagleapp\EagleSystems\PACE\Server\MARKIT\TCD\__TrancheCDSPrices_.csv
    17 503443 11/5/2018 0:00 110 TCD 11/5/2018 4:02 Y 11/5/2018 4:04 11/5/2018 4:04 11/5/2018 0:00 0 0 0 0 26682 280842 11/5/2018 0:00 vpr1eagleapp01\EagleSystems\PACE\Server\MARKIT\TCD1\20181105040255__CITrancheCDSPrices_20181102.csv vpreagleapp\EagleSystems\PACE\Server\MARKIT\TCD\__CITrancheCDSPrices_.csv
    18 503444 11/5/2018 0:00 123 TCD 11/5/2018 4:04 Y 11/5/2018 4:04 11/5/2018 4:04 11/5/2018 0:00 13 0 0 0 X 34674 280843 11/5/2018 0:00 ISGFileShare\CFDS\CDX_Tranche_Price.txt ISGFileShare\CFDS\CDX_Tranche_Price.txt
    19 503445 11/5/2018 0:00 123 NPO 11/5/2018 4:07 Y 11/5/2018 4:07 11/5/2018 4:07 11/5/2018 0:00 0 0 0 0 X 39308 280844 11/5/2018 0:00 ISGFileShare\CFDS\NPO_Price.txt ISGFileShare\CFDS\NPO_Price.txt
    20 503446 11/5/2018 0:00 221 CMS 11/5/2018 4:28 Y 11/5/2018 4:29 11/5/2018 4:29 11/5/2018 0:00 13 0 0 0 40271 280845 11/5/2018 0:00 vpr1eagleapp01\EagleSystems\PACE\Server\BBBO\CMS1\20181105042834__bbpsrisk_cms.txt_20181105042859.20181105 vpreagleapp\EagleSystems\PACE\Server\BBBO\CMS\__bbpsrisk_cms.txt_.
    21 503447 11/5/2018 0:00 123 FAC 11/5/2018 4:37 Y 11/5/2018 5:42 11/5/2018 5:42 11/5/2018 0:00 10388 0 0 0 34474 280847 11/5/2018 0:00 vpr1eagleapp01\EagleSystems\PACE\Server\SIMCORP\FAC1\20181105043701__SCD_FAC_181102043659.txt vpreagleapp\EagleSystems\PACE\Server\SIMCORP\FAC\__SCD_FAC_.txt
    22 503448 11/5/2018 0:00 123 SMF 11/5/2018 4:37 Y 11/5/2018 4:38 11/5/2018 4:47 11/5/2018 0:00 18879 0 134 0 36080 280846 11/5/2018 0:00 vpr1eagleapp01\EagleSystems\PACE\Server\SIMCORP\SMF1\20181105043657__SCD_SMF_021118043655.txt vpreagleapp\EagleSystems\PACE\Server\SIMCORP\SMF\__SCD_SMF_.txt
    23 503449 11/5/2018 0:00 123 POS 11/5/2018 5:20 Y 11/5/2018 5:42 11/5/2018 5:47 11/5/2018 0:00 32271 0 0 0 34474 280847 11/5/2018 0:00 vpr1eagleapp01\EagleSystems\PACE\Server\SIMCORP\POS1\20181105052015__SCD_POS_THIRD_011118052006.txt vpreagleapp\EagleSystems\PACE\Server\SIMCORP\POS\__SCD_POS_THIRD_.txt
    24 503450 11/5/2018 0:00 123 POS 11/5/2018 5:28 Y 11/5/2018 5:47 11/5/2018 5:51 11/5/2018 0:00 32390 0 0 0 34474 280847 11/5/2018 0:00 vpr1eagleapp01\EagleSystems\PACE\Server\SIMCORP\POS1\20181105052831__SCD_POS_THIRD_021118052825.txt vpreagleapp\EagleSystems\PACE\Server\SIMCORP\POS\__SCD_POS_THIRD_.txt
    25 503451 11/5/2018 0:00 123 ETY 11/5/2018 5:30 Y 11/5/2018 5:42 11/5/2018 5:42 11/5/2018 0:00 221 0 0 0 34474 280847 11/5/2018 0:00 vpr1eagleapp01\EagleSystems\PACE\Server\SIMCORP\ETY1\20181105052921__SCD_ETY_COL_051118052916.txt vpreagleapp\EagleSystems\PACE\Server\SIMCORP\ETY\__SCD_ETY_COL_.txt
    26 503452 11/5/2018 0:00 123 TRD 11/5/2018 5:30 Y 11/5/2018 5:51 11/5/2018 6:00 11/5/2018 0:00 17990 29 0 29 34474 280847 11/5/2018 0:00 vpr1eagleapp01\EagleSystems\PACE\Server\SIMCORP\TRD1\20181105052919__SCD_TRD_021118052914.txt vpreagleapp\EagleSystems\PACE\Server\SIMCORP\TRD\__SCD_TRD_.txt
    27 503453 11/5/2018 0:00 123 COL 11/5/2018 5:40 Y 11/5/2018 6:00 11/5/2018 6:00 11/5/2018 0:00 1436 0 0 0 34474 280847 11/5/2018 0:00 vpr1eagleapp01\EagleSystems\PACE\Server\SIMCORP\COL1\20181105054024__SCD_COL_AGR021118054019.txt vpreagleapp\EagleSystems\PACE\Server\SIMCORP\COL\__SCD_COL_AGR.txt
    28 503454 11/5/2018 0:00 123 COL 11/5/2018 5:40 Y 11/5/2018 6:00 11/5/2018 6:00 11/5/2018 0:00 1436 0 0 0 34474 280847 11/5/2018 0:00 vpr1eagleapp01\EagleSystems\PACE\Server\SIMCORP\COL1\20181105054026__SCD_COL_PMT021118054022.txt vpreagleapp\EagleSystems\PACE\Server\SIMCORP\COL\__SCD_COL_PMT.txt
    29 503455 11/5/2018 0:00 110 RDX 11/5/2018 6:01 Y 11/5/2018 6:47 11/5/2018 7:26 11/5/2018 0:00 9635 0 0 0 39889 280853 11/5/2018 0:00 vpr1eagleapp01\EagleSystems\PACE\Server\MarkIT\RDX1\20181105060023__CDXCreditIndex_20181102.csv vpreagleapp\EagleSystems\PACE\Server\MarkIT\RDX\__CDXCreditIndex_.csv
    30 503456 11/5/2018 0:00 110 RDX 11/5/2018 6:01 Y 11/5/2018 7:26 11/5/2018 7:59 11/5/2018 0:00 7543 0 0 0 39889 280853 11/5/2018 0:00 vpr1eagleapp01\EagleSystems\PACE\Server\MarkIT\RDX1\20181105060030__ITRAXXCreditIndex_20181102.csv vpreagleapp\EagleSystems\PACE\Server\MarkIT\RDX\__ITRAXXCreditIndex_.csv
    31 503457 11/5/2018 0:00 110 VAL 11/5/2018 6:01 Y 11/5/2018 6:01 11/5/2018 6:01 11/5/2018 0:00 383 0 0 0 39219 280848 11/5/2018 0:00 vpr1eagleapp01\EagleSystems\PACE\Server\MARKIT\VAL1\Markit_CDS_Valuations_02Nov2018.csv vpreagleapp\EagleSystems\PACE\Server\MARKIT\VAL\Markit_CDS_Valuations_Nov.csv
    32 503458 11/5/2018 0:00 123 PDA 11/5/2018 6:05 Y 11/5/2018 6:05 11/5/2018 6:12 11/5/2018 0:00 25490 0 0 0 X 36109 280849 11/5/2018 0:00 vpr1eagleapp01\EagleSystems\PACE\Server\Exporter Files\PPDA_11052018061227.txt vpreagleapp\EagleSystems\PACE\Server\Exporter Files\PPDA_.txt

      • Anonymous's avatar
        Anonymous
        Not applicable

        based on each unique event name - difference between num_processed T-1 vs T.

         

         

         

        eg.  event name ISGFileShare\CDFD\trigger_prp_ca.txt 

        Nov 5 - num_processed 4374

        Nov 4 - num_processed 4374

         

        Difference = 0

  • Anonymous's avatar
    Anonymous
    Not applicable

    Sorry I just realized my subject request is causing the confusion.  Yes I would like a measure.  I am trying to compare day over day change in num_processed of each event name.  

     

    Desired output to display in a report:

     

    Date Nov 9, 2018

     

    End_date      Event Name                                     num_processed   Record Count Difference 

     

    Nov 9            ISGFileShare\CFDS\pace_div.txt        220                       3

     

    Nov 8            ISGFileShare\CFDS\pace_div.txt        217