Forum Discussion

e175429's avatar
e175429
Helper IV
1 year ago
Solved

Tracking Totals by Dates

Hey all,

 

This is a sample of my data. The actualy data has over 15k records and I would love to upload the whole thing here to make it easier but I don't know how.

 

I am trying to track the prepared date vs the approved date by month (and maybe by year). 

For example, from the below sample, in Feb 2024, 4 projects were prepared but 3 were approved.

                                                            In Jul 2024, 2 projects were prepared and 2 were approved.

                                                            So and so forth.

TeamType
Project Description
Prepared
Date
Prepared
By
Approved
Date
PCONEW BUILD./SITE. CHURCH 1-1-2-A3-B-SP-AL8/23/2024PF58/26/2024
PCOCONVERT CLUB TO RESTAURANT 1-1-5-B-B 2003 IBC7/31/2024ARN7/31/2024
SCOREMODEL/ADD COFFEE SHOP IN STORE/1-1-2-B-B/SPRINK5/5/2025ARN 
PCCNEW 4 STORY S.F. RES W/ ATT GAR (1-4-5-R3-B-13R) 06 IBC2/6/2024ARN2/6/2024
PCQNEW 4 STORY S.F. RES W/ ATT GAR (1-4-5-R3-B-13R) 06 IBC2/6/2024PF5 
SCCNEW 4 STORY S.F. RES W/ ATT GAR (1-4-5-R3-B-13R) 06 IBC2/15/2024ARN2/15/2024
PCCNEW 4 STORY S.F. RES W/ ATT GAR (1-4-5-R3-B-13R) 06 IBC2/6/2024ARN2/6/2024
OCOHI RISE OFFICE REMODEL 1-12-1-B-A 2006 IBC 100%SPK / FA7/31/2024ARN7/31/2024
OCQNEW 4 STORY S.F. RES W/ ATT GAR (1-4-5-R3-B-13R) 06 IBC1/26/2024ARN1/26/2024

 

In BI, I've created a Date table:

 

When I go to graph, I jus get straight, horizontal lines:

 

Any help would be greatly appreciated!

Thanks

  • Hi e175429 not able to upload file, there is active relationship between prepared date and date, 

    inactive between approved date and date right?

8 Replies

  • 1. Create a Date  table using CALENDAR(MIN(PreparedDate), MAX(PreparedDate))

    2. Create following  2 measures 

    Count of Prepared =
    CALCULATE(
    COUNTROWS(Base),
    NOT(ISBLANK(Base[PreparedDate])),
    USERELATIONSHIP(Base[PreparedDate], 'Date'[Date])
    )

     

    Count of Approved =
    CALCULATE(
    COUNTROWS(Base),
    NOT(ISBLANK(Base[ApprovedDate])),
    USERELATIONSHIP(Base[ApprovedDate], 'Date'[Date])
    )

    3. Buld the visual using year and month from Date table and the mesures from the Base tabel

    • e175429's avatar
      e175429
      Helper IV

      Thank you for your assistance.

       

      I created the date table:

       

      I am getting the following error:

       

  • Hi,

    I am not sure if I understood your question correctly, but I tried to create a sample pbix file like below.

    Please check the below picture and the attached pbix file.

     

     

     

     

    • e175429's avatar
      e175429
      Helper IV

      Thank you for your assistance.

       

      I came very close with your advice, but there is a slight issue.

       

      This is my graph after mirroring your BI file:

      The part that's circled should be merged in between the dates instead of it's own standalone number. Does that make sense?

       

      For instance, here are the empty approved dates in my full data:

      So for March 2024, the line graph for total approved should dip a little below the total prepared by 1.

      For May 2025, the line graph for total approved should dip a little below the total prepared by 13.

      For Aug 2024, the line graph for total approved should dip a little below the total prepared by 22.

      So on....

       

      Both lines, total approved and total prepared, should not be in perfect unison and that "blank" on the x-axis should not be there.

       

       

  • Hi e175429 please try this

    Prepared Count =
    COUNTROWS(Projects)
     
    Approved Count =
    CALCULATE (
        COUNTROWS(Projects),
        USERELATIONSHIP(Projects[Approved Date], 'date'[Date]),
        NOT(ISBLANK(Projects[Approved Date]))
    )
     

     

    • e175429's avatar
      e175429
      Helper IV

      Are you able to upload your pbix file?

       

      This is what I did:

       

      This is what I got:

       

       

      • techies's avatar
        techies
        Super User

        Hi e175429 not able to upload file, there is active relationship between prepared date and date, 

        inactive between approved date and date right?