Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
kollasv
Helper I
Helper I

Power BI measure

kollasv_1-1658769050532.png

 

Hi All,

I need to  calculate total number of resources who were submitted timesheets throughout the month 

please help me

1 ACCEPTED SOLUTION
v-stephen-msft
Community Support
Community Support

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.

vstephenmsft_0-1658996788985.png

vstephenmsft_2-1658996886234.png

You can create a measure to get the total.

Measure = CALCULATE(COUNT('Table'[Name]),FILTER('Table',[Value]="Submitted"))

vstephenmsft_3-1658997060443.png

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"))

vstephenmsft_4-1658997187551.png

 

 

 

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.

View solution in original post

2 REPLIES 2
v-stephen-msft
Community Support
Community Support

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.

vstephenmsft_0-1658996788985.png

vstephenmsft_2-1658996886234.png

You can create a measure to get the total.

Measure = CALCULATE(COUNT('Table'[Name]),FILTER('Table',[Value]="Submitted"))

vstephenmsft_3-1658997060443.png

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"))

vstephenmsft_4-1658997187551.png

 

 

 

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.

amitchandak
Super User
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() )

 

 

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.