Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi all,
I am building out a report that I need to calculate equipments checked rate by people. (whether an equipment is checked by people)
For example, Equipment 10041 were transferred between poeple 30.35.47; and being checked by 30 two times, 35.47 one time respectively.
I have measures that calculated total number of equipments & total number of checked equipments & checked rate (checked/all)
and they'll be displayed by a Matrix table with hierarchy. (people - equipment - check date)
I would like to create one Date Slicer for user that they can select a Date range, and then showing the check rate by people.
In this case, I don't know how to combine my date column into one slicer is a better solution.
If I use "Check Date" as slicer, an equipment whithout being checked won't show up in table.
Anyone knows a solution for this case?
Thank you!!
Hi @Anonymous
the best way I think is to add a column [Is Checked], then replace the column [Check Date] with [Expected Check Date].
I create a sample, and you can try like this.
-
Measure1 =
var _countCheck=CALCULATE(COUNTROWS('Table'),FILTER(ALLSELECTED('Table'), 'Table'[Is Checked]==1&&'Table'[People ID]==MIN('Table'[People ID])))
var _countAll=CALCULATE(COUNTROWS('Table'),FILTER(ALLSELECTED('Table'), 'Table'[People ID]==MIN('Table'[People ID])))
return DIVIDE(_countCheck,_countAll)filter =
var _rangeS=CALCULATE(FIRSTDATE('calendar'[Date]),ALLSELECTED('calendar'))
var _rangeE=CALCULATE(LASTDATE('calendar'[Date]),ALLSELECTED('calendar'))
return IF(MIN('Table'[Expected Check Date])<=_rangeE&&MIN('Table'[Expected Check Date])>=_rangeS,1,0)
Process:
Result:
Best Regards,
Community Support Team _ Tang
If this post helps, please consider Accept it as the solution to help the other members find it more quickly.
Hi,
Just wanted to update here. I am able to get my desired result with below meausres.
total_equipment_num=
var _rangeS=CALCULATE(FIRSTDATE('Calendar'[Date]),ALLSELECTED('Calendar'))
var _rangeE=CALCULATE(LASTDATE('Calendar'[Date]),ALLSELECTED('Calendar'))
return CALCULATE(DISTINCTCOUNT('Table'[Equipment ID]), FILTER('Table','Table'[Date In] <= _rangeE && 'Table' [Date Out] >= _rangeS
total_inspected_equipment_num=
var _rangeS=CALCULATE(FIRSTDATE('Calendar'[Date]),ALLSELECTED('Calendar'))
var _rangeE=CALCULATE(LASTDATE('Calendar'[Date]),ALLSELECTED('Calendar'))
return CA:CULATE(DISTINCTCOUNT('Table'[Equipment ID], 'Table'[Check Date] <= _rangeE && 'Table'[Chec k Date] >= _rangeS
Check Rate = DIVIDE(total_inspected_equipment_num, total_equipment_num, 0)
Tang,
I appreciate all your help. However, it looks like a little bit different from what I am trying to do.
I am trying to calculating equipment inspected rate by people.
So if People 10 has 2 equipment and both are been checked in the selected time, then the rate is 100%.
If only one of them is checked, then 50%; if both of them were checked but not during selected time, then 0%.
Please see my attached table for more details.
I don't quite understand what does "Expected check date" mean in your example. Can you please explain more? I guess I can build something based on your idea.
Thank yous so much!
What does Date In of 1/1/1900 mean? That does not make any sense.
Hi Ashish,
1/1/1900 It's more like the date of equipment purchase is not trackable or is long before the system setup.
Hi,
Well then that is a problem. My idea was a create as many rows as there are days between Date In and Date Out. 12/31/9999 can always be replaced with Today's date but there is nothing i can do about 1/1/1900.
Right. I think I can't replace 1900/1/1 with the other date. Thank you though.
Hi @Anonymous
you said, "Check ID and Check Date are generated when person checked the equipment. (empty check ID/check date means never being checked)"
if I understand this sentence correctly, the difficulty lies in which date range the blank cell belongs to.
e.g.
Best Regards,
Community Support Team _ Tang
If this post helps, please consider Accept it as the solution to help the other members find it more quickly.
Hi xiaotang,
You are correct. This also is waht I am concerning about. So is it possible to use Date In & Date out as the slicer to filter this table? If so, every equipment has its onwn Date In/Out.
Another way to think about this, I am able to separate the table into two. That is,
Equipment Table
| People ID | Equipment ID | Date In | Date Out |
Check Table
| Equipment ID | Check ID | Check Date |
Add relationship in data model. It'd be a One (Equipment table) to Many (Check table) relationship.
With this, is it able to keep Equipment ID without being checked?
Thank you for your help!
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.