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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Enan
Helper I
Helper I

Average for the month of text data

Hi Expert,

I want to take average for the month ffor the attached data sets.

I need to consider only Sickess from the Main Category column.

I have one Fact table as per below and one DIM table which contain date.

Apprecaite your assistance.

Expected Result - Average Sickness for Feb-23 = 2.5

 

DateEmployee No.CodeMain Category
01-02-23123456SICKSickness
01-02-23123457SICKSickness
01-02-23123458SICKSickness
01-02-23123459LVEOthers
01-02-23123460LVEOthers
01-02-23123461LVEOthers
02-02-23123462LVEOthers
02-02-23123463LVEOthers
02-02-23123464COVDCOVD
02-02-23123465COVDCOVD
02-02-23123466COVDCOVD
02-02-23123467COVDCOVD
02-02-23123468COVDCOVD
02-02-23123469NOAVOthers
02-02-23123470NOAVOthers
02-02-23123471NOAVOthers
02-02-23123472NOAVOthers
02-02-23123473NOAVOthers
02-02-23123474NOAVOthers
03-02-23123456SICKSickness
03-02-23123457SICKSickness
03-02-23123458SICKSickness
03-02-23123459LVEOthers
03-02-23123460LVEOthers
03-02-23123461LVEOthers
03-02-23123462LVEOthers
03-02-23123463LVEOthers
03-02-23123464COVDCOVD
03-02-23123465COVDCOVD
03-02-23123466COVDCOVD
04-02-23123467COVDCOVD
04-02-23123468COVDCOVD
04-02-23123469NOAVOthers
04-02-23123470NOAVOthers
04-02-23123471NOAVOthers
04-02-23123472NOAVOthers
04-02-23123473NOAVOthers
04-02-23123474NOAVOthers
04-02-23123456SICKSickness
04-02-23123457SICKSickness
04-02-23123458SICKSickness
04-02-23123459LVEOthers
05-02-23123460LVEOthers
06-02-23123461LVEOthers
06-02-23123462LVEOthers
06-02-23123463LVEOthers
06-02-23123464COVDCOVD
06-02-23123465COVDCOVD
07-02-23123466COVDCOVD
07-02-23123467COVDCOVD
07-02-23123468COVDCOVD
07-02-23123469NOAVOthers
07-02-23123470NOAVOthers
08-02-23123471NOAVOthers
08-02-23123472NOAVOthers
08-02-23123473NOAVOthers
08-02-23123474NOAVOthers
08-02-23123456SICKSickness
08-02-23123457SICKSickness
09-02-23123458SICKSickness
09-02-23123459LVEOthers
09-02-23123460LVEOthers
09-02-23123461LVEOthers
09-02-23123462LVEOthers
09-02-23123463LVEOthers
10-02-23123464COVDCOVD
10-02-23123465COVDCOVD
10-02-23123466COVDCOVD
10-02-23123467COVDCOVD
11-02-23123468COVDCOVD
11-02-23123469NOAVOthers
11-02-23123470NOAVOthers
11-02-23123471NOAVOthers
12-02-23123472NOAVOthers
12-02-23123473NOAVOthers
12-02-23123474NOAVOthers
12-02-23123456SICKSickness
12-02-23123457SICKSickness
12-02-23123458SICKSickness
12-02-23123459LVEOthers
12-02-23123460LVEOthers
13-02-23123461LVEOthers
13-02-23123462LVEOthers
13-02-23123463LVEOthers
13-02-23123464COVDCOVD
13-02-23123465COVDCOVD
13-02-23123466COVDCOVD
14-02-23123467COVDCOVD
14-02-23123468COVDCOVD
14-02-23123469NOAVOthers
14-02-23123470NOAVOthers
14-02-23123471NOAVOthers
14-02-23123472NOAVOthers
14-02-23123473NOAVOthers
2 REPLIES 2
mark_endicott
Super User
Super User

@Enan - Did this work? Please could you mark it as the solution if yes, this helps other users find it. 

mark_endicott
Super User
Super User

@Enan - Try this in a measure:

 

VAR sick = CALCULATE( COUNT( Table[Employee No]), KEEPFILTERS( Table[Main Category] = "Sickness"))

VAR _total = CALCULATE( COUNT( Table[Employee No]), REMOVEFILTERS( Table[Main Category] ))

RETURN
DIVIDE( sick, _total, 0 )

 

Screenshot below shows its working with the data available:

 

mark_endicott_0-1719246801355.png

If this works, please mark it as the solution.

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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