Forum Discussion
alex1888
5 years agoNew Member
Build an asset availability report
Hello, I have the following requirement that I'm not sure can be realized using Power bi. My data source is dynamics 365, And involved in the data structure 2 relevant entities Assets and Allocatio...
- 5 years ago
Hi alex1888 ,
Create a measure as below:
Measure = var _mindate=CALCULATE(MIN('calendar table'[Date]),ALLSELECTED('calendar table')) var _maxdate=CALCULATE(MAX('calendar table'[Date]),ALLSELECTED('calendar table')) var _tab=CALCULATETABLE(VALUES('Allocation to assets'[Assets ID]),FILTER(ALL('Allocation to assets'),'Allocation to assets'[END DATE]<=_mindate||'Allocation to assets'[START DATE]>=_maxdate)) VAR _names=CALCULATETABLE(VALUES(Assets[ASSET NAME]),FILTER(ALL(Assets),'Assets'[Assets ID] in _tab)) Return CONCATENATEX(_names,'Assets'[ASSET NAME],",")And you will see:
For the related .pbix file,pls see attached.
Best Regards,
KellyDid I answer your question? Mark my post as a solution!
amitchandak
5 years agoSuper User
alex1888 , check the file attached. Treat the employee name as asset ID, and Leave date are occupied date. Now check the formula to show 0 for available and 1 for occupied. The asset table will act as one more dimension
- alex18885 years agoNew Member
Hi amitchandak thanks for the reply 😀, I admit I could not figure out the example you gave and the file.
But I may not have been clear - The table Allocation to assets Includes only data when the property IS NOT available I want to ask the opposite question, when the asset is available? Given your advice how to proceed?