Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
e175429
Helper IV
Helper IV

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:

e175429_0-1749493952218.png

e175429_1-1749494003185.png

 

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

 

Any help would be greatly appreciated!

Thanks

1 ACCEPTED SOLUTION

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

inactive between approved date and date right?

― Power BI | Microsoft Fabric | PL-300 | DP-600 | Blog: medium.com/@cseprs_54978

View solution in original post

8 REPLIES 8
techies
Solution Sage
Solution Sage

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]))
)
 
techies_0-1749575109778.png

 

― Power BI | Microsoft Fabric | PL-300 | DP-600 | Blog: medium.com/@cseprs_54978

Are you able to upload your pbix file?

 

This is what I did:

e175429_0-1749576783478.pnge175429_1-1749576794136.png

e175429_2-1749576812865.png

 

This is what I got:

e175429_3-1749576879970.png

 

 

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

inactive between approved date and date right?

― Power BI | Microsoft Fabric | PL-300 | DP-600 | Blog: medium.com/@cseprs_54978

Thank you!

 

I had it backwards:

My active relationship was between approved date and date and my inactive relationship was between prepared date and date. Once I switched them, I got the correct visual:

e175429_0-1749745776478.png

Thank you sooooo much!

 

Jihwan_Kim
Super User
Super User

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.

 

Jihwan_Kim_0-1749525285709.png

 

Jihwan_Kim_1-1749525509003.png

 

 



Microsoft MVP



If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.




LinkedInVisit my LinkedIn page




Outlook BookingSchedule a short Teams meeting to discuss your question



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:

e175429_3-1749571034146.png

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:

e175429_4-1749571810704.png

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.

 

 

SreeniBattula
Helper II
Helper II

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

Thank you for your assistance.

 

I created the date table:

e175429_2-1749566979450.png

 

I am getting the following error:

e175429_0-1749566845219.png

e175429_1-1749566917858.png

 

Helpful resources

Announcements
June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.