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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

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
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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