Forum Discussion
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?
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:
With .Day:
4 Replies
- FowmySuper 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 🙂
- MigWareHelper I
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
- nandicResident 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:
With .Day: - AnonymousNot 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