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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
ashako88
Frequent Visitor

Count Measure to create a summary table for Running Stock Percentage

Hi,

 

I need to create a summary table that will show a count summary that needs to look like: 

 

Program 1: <20%= 46 count , <0%=50 count, >100%= 20 count

Program 2: <<20%= 30 count , <0%=10 count, >100%= 5 count

 

This would serve as a summary table that audience can click to navigate to all, for example, 46 count that is below 20% running stock.

 

The issue is count formula will not work since the measurement in the picture is not in column/rows since I created the measure. I tried switch (true) as well to no luck. Any ideas how I can create this summary table?

 

This is what's running the image below:

Running Safety Stock = Calculate(DIVIDE([Ending Inventory], SUM(ORIS[SafeSt])), FILTER(ALLSELECTED('Date Table'[Date]),'Date Table'[Date] <=MAX('Date Table'[Date])))
 

 

ashako88_0-1638418494730.png

 

 

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

Hi @ashako88 ,

 

Is that you want the total rows show the result as your example, program 1?

If yes, you should use HASONEVALUE(<columnName>) to control if it is a total row. Something like the following:

Running Safety Stock =
IF( HASONEVALUE(TABLE[Material]), calculation for total, calculation for normal)

Calculation for normal the same as your measure running safety stock

Calculation for total, you need create a table via VAR _Table = COUNTROWS(FILTER(TABLE, [precent]>0.2 && etc.. ) or COUNTROWS(SUMMARIZE (TABLE,.......). But i recommend you to calculate the present in fact table. If in measure will affect the performance of inactive.

You can share some example data and expects result if you need more help.

 

Best Regards

Community Support Team _ chenwu zhu

 

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

1 REPLY 1
v-chenwuz-msft
Community Support
Community Support

Hi @ashako88 ,

 

Is that you want the total rows show the result as your example, program 1?

If yes, you should use HASONEVALUE(<columnName>) to control if it is a total row. Something like the following:

Running Safety Stock =
IF( HASONEVALUE(TABLE[Material]), calculation for total, calculation for normal)

Calculation for normal the same as your measure running safety stock

Calculation for total, you need create a table via VAR _Table = COUNTROWS(FILTER(TABLE, [precent]>0.2 && etc.. ) or COUNTROWS(SUMMARIZE (TABLE,.......). But i recommend you to calculate the present in fact table. If in measure will affect the performance of inactive.

You can share some example data and expects result if you need more help.

 

Best Regards

Community Support Team _ chenwu zhu

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.