cancel
Showing results for 
Search instead for 
Did you mean: 
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
June 2022 update 768X460.jpg

Check it out!

Click here to read more about the June 2022 updates!

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Power BI Dev Camp Session 23 768x460.jpg

Check it Out!

Mark your calendars and join us on Thursday, June 30 at 11a PDT for a great session with Ted Pattison!

June 20 episode 7 with aka link 768x460.jpg

The Power BI Community Show

Join us on June 20 at 11 am PDT when Kim Manis shares the latest on Azure Synapse analytics, the Microsoft Intelligent Data Platform, and notable Power BI Updates from Microsoft Build 2022.

Top Solution Authors
Top Kudoed Authors