BookmarkSubscribeRSS Feed
sassy7
Obsidian | Level 7

Hi,

I am working with SAS VA 7.3 for building reports for quality control in manufacturing industry. The dashboard should show three types of reports linked together: the frequency of each defect, the frequency of the defects grouped by the product type  and a time series that shows the frequency and % of defects per day.

The three reports are linked through a filter interaction: firstly the type of defect is selected, then the product group and at the end, the time series shows the trend of the defects through the time period.

I am having problems with the time series, more precisely with building the aggregate measure that shows the % of defect on total items produced. I have tried with a couple of aggregate measures but none seems to work. The first formula shows the % of defect on daily basis (so for the whole time period the sum of % is 100) and the second formula is  equal 100% for each day.

Instead I would like to show the % of defect on total items produced day by day: 

Here's an example of the data source 

sassy7_0-1593098887077.png

Can you help me resolving this issue?

 

3 REPLIES 3
PetriRoine
Pyrite | Level 9

Hello @sassy7 

 

Let's see if I can help you. Here's a table I did:

Comm_Capture.PNG

I wasn't quite sure about the exact measure you were after so here's my three pics:

  1. Defected (% of total) is daily defects divided by total defects.
  2. Sum ByGroup Defected / Sum ByGroup Frequency is daily defects divided by daily production.
  3. Sum ByGroup Defected / Sum ForAll Frequency is daily defect divided by total production.

Is any of these what you want?

 

Best regards,

Petri

sassy7
Obsidian | Level 7
Hi Petri
Many thanks for your help!!! 🙂 The second one (B) is the aggregate measure I was interested in obtaining.
PetriRoine
Pyrite | Level 9

Great!

 

So the steps taken are:

  1. Create a new calculated item called Defected
    IF ( 'Defect'n = 'NONE' )
    RETURN 0
    ELSE 'Frequency'n
  2. Create a new calculated item called f.ex. Defected %
    Sum [_ByGroup_] ('Defected'n) / Sum [_ByGroup_] ('Frequency'n)

 

That's it! 

 

Best regards,

Petri

sas-innovate-white.png

Missed SAS Innovate in Orlando?

Catch the best of SAS Innovate 2025 — anytime, anywhere. Stream powerful keynotes, real-world demos, and game-changing insights from the world’s leading data and AI minds.

 

Register now

Tips for filtering data sources in SAS Visual Analytics

See how to use one filter for multiple data sources by mapping your data from SAS’ Alexandria McCall.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 3 replies
  • 807 views
  • 0 likes
  • 2 in conversation