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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
MigWare
Helper I
Helper I

Filtering measure with different behaviours

Hi,

 

I´m trying to get the number of days that someone worked in the field and I´m using the below measure to do that. It´s working when in a matrix with the worked_date field in the Rows and the measure in the values but when i put it in a card it´s showung all the 366 days instead of the applied filters in the measure. Any ideias why?

 

Number of Days worked = CALCULATE(count (Table[worked_date].[Day]),Table[Type]="In the field",Table[status]="Submitted")
1 ACCEPTED SOLUTION
nandic
Resident Rockstar
Resident Rockstar

@MigWare ,
Card visual must display same value as total value on crosstab if it is the same measure. It is the same number, just different visualization.
Try to remove .day part here: Table[worked_date].[Day])
I tried to replicate data and put some dummy data, if i add .Day i get 366 both in crosstab and card. If i remove that part i get correct data both in crosstab and card.

Without .Day:
days in field.PNG

With .Day:
days in field day.PNG

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

HI @MigWare,

I think it should be related to power bi auto date/time analysis feature, normally it will auto-generated a hidden calendar table with date fields.
It seems like you're formula reference and calculates on the hidden hierarchy date fields instead of raw table records so it got the wrong result. Please take a look at the following document to know more about that field:

Apply auto date/time in Power BI Desktop 

Regards,

Xiaoxin Sheng

nandic
Resident Rockstar
Resident Rockstar

@MigWare ,
Card visual must display same value as total value on crosstab if it is the same measure. It is the same number, just different visualization.
Try to remove .day part here: Table[worked_date].[Day])
I tried to replicate data and put some dummy data, if i add .Day i get 366 both in crosstab and card. If i remove that part i get correct data both in crosstab and card.

Without .Day:
days in field.PNG

With .Day:
days in field day.PNG

Fowmy
Super User
Super User

@MigWare 

Try this please:

Number of Days worked = 
CALCULATE(
    COUNTROWS(Table),
    Table[Type]="In the field",
    Table[status]="Submitted"
)

 

________________________

Did I answer your question? Mark this post as a solution, this will help others!.

Click on the Thumbs-Up icon on the right if you like this reply 🙂

YouTube, LinkedIn

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Thanks Fowmy but that´s counting all the in the field and submited and it´s bypassing the date field.

I need to count the date, because user A has 5 visits in day 14 and that only counts has one day in the field, not 5. Hope that clears the info

 

 
 
 

 

 

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Users online (1,800)