Forum Discussion
baneworth
Helper III
5 years agoIssue with Matrix and AVG calulcation
Hello, I have a Report with a flaw where modules are counted daily (MO-FR) and then the monthly AVG is then used for Utilization Calculcation (%). If you look at the screenshot below, you can...
- 5 years ago
Hi baneworth ,
Create a measure as below:
Measure 2 = var _dates=CALCULATETABLE(VALUES('Date'[Date]),FILTER(ALL('Date'),MONTH('Date'[Date])=MONTH(MAX('Date'[Date]))&&YEAR('Date'[Date])=YEAR(MAX('Date'[Date]))&&'Date'[IsWeekday]=TRUE())) var _days=CALCULATE(COUNTROWS(_dates),FILTER(_dates,MONTH('Date'[Date])=MONTH(MAX('Date'[Date]))&&YEAR('Date'[Date])=YEAR(MAX('Date'[Date])))) var _number=CALCULATE(COUNT('Calculated Table'[Index]),FILTER(ALL('Calculated Table'),'Calculated Table'[Group]=MAX('Calculated Table'[Group])&&'Calculated Table'[Date] in _dates)) Return DIVIDE(_number,_days)+0And you will see:
For the related .pbix file,pls see attached.
Best Regards,
KellyDid I answer your question? Mark my post as a solution!
Ashish_Mathur
Super User
5 years agoHi,
Why have you created a calculated table? Why not drag fields from individual tables? You may have to rebuild some relationships but i think that will be a better approach.