Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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?
Solved! Go to Solution.
@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:
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
@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:
@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 🙂
⭕ 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
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
111 | |
95 | |
80 | |
68 | |
59 |
User | Count |
---|---|
150 | |
119 | |
104 | |
87 | |
67 |