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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
arif_tsrm
Helper I
Helper I

Monthly line chart calculation

I have two fact table( FactDeskCapacity, FactStaffAttendance) connected with Dim Calender Table using key MonthName,
Have two measure "Desk Capacity" is count of Desk from FactDeskCapacity, and "Total Staff Attendance" is DistinctCount of Date from FactStaffAttendance, please see the picture, now I want to show in a monthly line chart, in a month how many days "Total Staff Attendance" is greater than "Desk Capacity", for example the result will be 2 for february ( 7 , 9 th February)

problem Pic.PNG

6 REPLIES 6
Uzi2019
Super User
Super User

Hi @arif_tsrm 

please create the follwoing measure
Count day= CALCULATE( COUNT(date), FILTER('Table',[measure1]>[measure2]))


If I answered your question please give kudos and accept it as a solution!

 

 

Don't forget to give thumbs up and accept this as a solution if it helped you!!!

Thank you for you reply, I have using your  above measure but not working , please see my below measure

test = var tst=CALCULATE(COUNT(FactStaffAttendance[DateOnly]),FILTER(FactStaffAttendance, [Total Staff Attendance]>[Desk Capacity]))
return tst

Hi @arif_tsrm 
can you share screen shot what error /answer you are getting??

 

Don't forget to give thumbs up and accept this as a solution if it helped you!!!

please see the screenshort, nothing is returningmesure.PNG

Hi @arif_tsrm 
I have to check the realtionship between all tables. why data is not flowing?
where you have craeted that measure??
you have 3 tables right?

 

can you share the data modeling ?
like pbix file on googe drive

 

 

Don't forget to give thumbs up and accept this as a solution if it helped you!!!

Yes, only three table is used, please see the picture, data is secure for this reason I am not able to share the model.  here FactStaffAttendance is FactAccessControl and Total Desk is FactDeskCapacity.Data Modeling.PNG

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors