Forum Discussion
Anonymous
3 years agoNot applicable
Help with Viewing Totals per week in matrix Table
I have a report that shows a planned date of how materials are needed for production and materials available in the warehouse We will like to know when their will be a shortage of material weekly ...
Anonymous
3 years agoNot applicable
Hi Anonymous ,
You can create a measure as below to get the week total:
Week total =
VAR _selmt =
SELECTEDVALUE ( 'Table'[[Material] )
VAR _seldesc =
SELECTEDVALUE ( 'Table'[Material Description] )
VAR _seluom =
SELECTEDVALUE ( 'Table'[Base UOM] )
VAR _selmrpe =
SELECTEDVALUE ( 'Table'[MRP element] )
VAR _selindi =
SELECTEDVALUE ( 'Table'[ABC Indicator] )
VAR _selpdate =
SELECTEDVALUE ( 'Table'[Planned dates] )
RETURN
CALCULATE (
COUNT ( 'Table'[Material] ),
FILTER (
ALLSELECTED ( 'Table' ),
'Table'[Material] = _selmt
&& 'Table'[Material Description] = _seldesc
&& 'Table'[Base UOM] = _seluom
&& 'Table'[MRP element] = _selmrpe
&& 'Table'[ABC Indicator] = _selindi
&& WEEKNUM ( 'Table'[Planned dates], 1 ) = WEEKNUM ( _selpdate, 1 )
)
)
If the above one is not working, please provide some raw data in your table(s) (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.
How to upload PBI in Community
Best Regards