Forum Discussion
Power BI measure
Hi All,
I need to calculate total number of resources who were submitted timesheets throughout the month
please help me
- Anonymous4 years ago
Hi kollasv ,
Is the data you provided initial data, or is it data from a matrix visual?
If it is initial data, you can unpivot the date columns in Power Query first, so that they become a column of date and a column of types.
You can create a measure to get the total.
Measure = CALCULATE(COUNT('Table'[Name]),FILTER('Table',[Value]="Submitted"))If you want to also ignore any filters that might have been applied, add the ALL function.
Measure 2 = CALCULATE(COUNT('Table'[Name]),FILTER(ALL('Table'),[Value]="Submitted"))Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
2 Replies
- amitchandak
Super User
kollasv ,
a New measure =
var _cnt = calculate(distinctcount('Table'[Date]), Filter(allselected('Date'), 'Date'[Month Year] = max( 'Date'[Month Year] ) ) )
var _sub = calculate(distinctcount('Table'[Date]), Filter(allselected('Date'), 'Date'[Month Year] = max( 'Date'[Month Year] ) ),
filter(allselected(Table), Table[Name] = Max(Table[Name] ) ) )return
if(_sub=_cnt, true() , false() )
- AnonymousNot applicable
Hi kollasv ,
Is the data you provided initial data, or is it data from a matrix visual?
If it is initial data, you can unpivot the date columns in Power Query first, so that they become a column of date and a column of types.
You can create a measure to get the total.
Measure = CALCULATE(COUNT('Table'[Name]),FILTER('Table',[Value]="Submitted"))If you want to also ignore any filters that might have been applied, add the ALL function.
Measure 2 = CALCULATE(COUNT('Table'[Name]),FILTER(ALL('Table'),[Value]="Submitted"))Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.