Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
I'll preface by saying I'm new to DAX / PBI. I have two fields - "possible" and "actual" - for multiple machines and also daily data for each. I created a new measure to create a utilization percentage. I need to count the instances where this is less than 65%, but cannot figure it out. As an example of what I'm trying to achieve:
I would expect to get 4 in this example. My dataset is signifcantly larger, but I'm way low on my figures. I assume b/c I'm only counting days and not days AND machines?! If so....how do I alter my formula correctly?
Solved! Go to Solution.
Ok please try
_Under_Utilized =
SUMX (
SUMMARIZE (
TableName,
TableName[Date],
TableName[Machine ID],
TableName[Area],
TableName[District],
TableName[Facility]
),
CALCULATE ( IF ( [_Utilization] < 0.65, 1 ) )
)
However, please try
_Under_Utilized =
SUMX (
CROSSJOIN ( VALUES ( 'Date'[Date] ), VALUES ( TableName[Machine ID] ) ),
CALCULATE ( IF ( [_Utilization] < 0.65, 1 ) )
)
Would you please share a screenshot of your visual hiding any sensitive data? I guess the count will be displayed in a card visual?
I'm just building it out, but yes, as a test, I'm using it in a card. I will later utilize in barcharts, etc to showcase top opportunities (based on lowest utilization). I'm comparing my figures to the QLIK visual I have that PBI is replacing, but I've drilled to individual items and a small subset of the data (single week) and verified the formula above is not accurate
Sorry I think I was not clear in my question.
The utilization value that you are trying to count is based on machine/date? Are we talking about daily basis? And do you have a date table? If not please clarify. Thank you
Thank you for clarification. What are you slicing by when using the [_Utilization] measure?
The date comes in with the data feed. Multiple columns - physical location hierarchy (Area, District, Facility), Date, Machine ID, and aforementioned actual / possible throughput. I will be slicing by the hierarchy to show top opportunity Area, District, Facility, Machine ID
Ok please try
_Under_Utilized =
SUMX (
SUMMARIZE (
TableName,
TableName[Date],
TableName[Machine ID],
TableName[Area],
TableName[District],
TableName[Facility]
),
CALCULATE ( IF ( [_Utilization] < 0.65, 1 ) )
)
Sorry for delayed response....had some vacation days.
It seemed to result in too high of a number when I had all of the hierarchy levels summarized, but worked great with simply the date and machine ID.
Thank you so much!
User | Count |
---|---|
25 | |
12 | |
8 | |
8 | |
7 |
User | Count |
---|---|
27 | |
13 | |
13 | |
11 | |
6 |