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 there,
I have a measure to calculate the occurrence when a shift is longer than 6 hours:
Occurrence = COUNTX (
FILTER (
SUMMARIZECOLUMNS (
Timekeeping_Data[Date],
Timekeeping_Data[SHIFT_ID],
Timekeeping_Data[FirstName],
"shift", DATEDIFF([FistDayStart],[FistBreakStart],MINUTE)/60
),
[shift] > 6
),
Timekeeping_Data[FirstName]
)
It works fine when I put the measure to the card visual and also when I filter the whole page by Timekeeping_Data[Date] but when I want to create the occurrence by date using the bar chart I'm receiving the error:
SummarizeColumns() and AddMissingItems() may not be used in this context.
Could someone help me with modifying the measure to be used in the bar chart per day?
Thanks a lot.
Solved! Go to Solution.
Hi,
I am not sure how your dataset looks like, but please try something like below.
Occurrence =
COUNTX (
FILTER (
ADDCOLUMNS (
SUMMARIZE (
Timekeeping_Data,
Timekeeping_Data[Date],
Timekeeping_Data[SHIFT_ID],
Timekeeping_Data[FirstName]
),
"@shift", CALCULATE ( DATEDIFF ( [FistDayStart], [FistBreakStart], MINUTE ) ) / 60
),
[@shift] > 6
),
Timekeeping_Data[FirstName]
)
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
Hi,
I am not sure how your dataset looks like, but please try something like below.
Occurrence =
COUNTX (
FILTER (
ADDCOLUMNS (
SUMMARIZE (
Timekeeping_Data,
Timekeeping_Data[Date],
Timekeeping_Data[SHIFT_ID],
Timekeeping_Data[FirstName]
),
"@shift", CALCULATE ( DATEDIFF ( [FistDayStart], [FistBreakStart], MINUTE ) ) / 60
),
[@shift] > 6
),
Timekeeping_Data[FirstName]
)
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
That's it.
Thanks a lot"
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 |
---|---|
46 | |
22 | |
20 | |
15 | |
13 |
User | Count |
---|---|
49 | |
41 | |
39 | |
19 | |
19 |