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.
Table:
Date | Location Number | Hour | Count of Items | Dock Door
I have been trying to figure out a formula/process to figure out the solution to my problem, but spinning in circles. I am looking to get: on a specific date, in a specific hour, if the count of items is more than 50 at the dock door location (multiple dock doors within a location) that is flags as productive. If less than 50 then it flags as non productive.
Hour count is 1 - 24, so just looking to get in a time frame of one hour, each day, if a particular location at their particular dock door has more than 50 items going out or less than 50 items going out.
Hope this makes sense. If you need further explanation, let me know.
Thanks for any help.
-- Say you have a measure that gives you the count
-- of items for any selections of attributes in
-- your dimensions. Name it [Count of Items].
-- Then try this:
[Flag] = IF( [Count of Items] > 50, "productive", "non-productive")
-- If you put Date, Hour and Door Location on axes and slicers,
-- you'll get what you need. If you miss to filter any one
-- of the attributes, the measure will still return an outcome
-- but you have to interpret it correctly. If you want to
-- make sure that this only shows results if all three attributes
-- have been selected, then you should use this:
[Flag] =
var __oneDaySelectedOnly = HASONEFILTER( TableWithDates[Date] )
var __oneHourSelectedOnly = HASONEFILTER( TableWithHours[Hour] )
var __oneDockDoorSelected = HASONEFILTER( TableWithDockDoors[Dock Door] )
var __shouldDisplay = TRUE()
&& __oneDaySelectedOnly
&& __oneHourSelectedOnly
&& __oneDockDoorSelected
var __flag =
IF( [Count of Items] > 50, "productive", "non-productive")
return
if( __shouldDisplay, __flag )
-- Please replace the names of the table(s) with the
-- tables you have in your model. It's probably one
-- and the same table 🙂
Best
Darek
Been stuck on this for a couple of days now, any help would be appreciated!
Please provide sample data (not a picture of the data) and your desired outcome.
Also are the day and hour selected by slicer?
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 |
---|---|
41 | |
21 | |
21 | |
14 | |
13 |
User | Count |
---|---|
43 | |
35 | |
32 | |
18 | |
18 |