WIP Dashboard

Has anyone able to recreate this request?

I have a SQL Query I use for Crystal Reports but struggling to turn this into a BAQ :confused:

I worked on one in the past, but never got it completed. I may be able to generate a BAQ if you’re willing to share your SQL magic…

Hi Doug,

Give it a go…

Thanks
Aaron

That doesn’t look so bad. Is there anything that was throwing you off?

WIP!?
image

@aarong - here’s an incomplete version of your SQL. But you should be able to follow it through to completion.

Just keep making InnerSubQueries to satisfy your sub queries g thru p, and add them to the top level.

Trickiest part is making sure that you use the right alias for PartTran in the sub queries. a uses PartTran, but d uses PartTran1, f uses PartTran2, etc…

E10H-WIP-Dashboard.baq (58.5 KB)

I use a calculated field in place of your use of coalesce()

coalesce(mattodate,0.00) mattodate

becomes
(case when (a.Calculated_mattodate) is null then 0.00 else a.Calculated_mattodate end)

edit

turns out you can use COALESCE() in a calculated field.

4 Likes

image

1 Like

Is there anyway on a dashboard to select data from a period of time? Adding the date selection fields are fine but can this be customised to pull data from lets say End of Last Month?

Only show the data in that dashboard based on 31/08/2020 and nothing newer?

You have to add a calculated field that has the same value as the field you’re filtering on.

Example: My BAQ has the field PartTran.TranDate, And I want to filter for a date range.

  1. In the BAQ, create a calc field named EndDate, with the formula PartTran.TranDate (this is just a duplicate of PartTRan.TranDate
  2. On the dashboard’s Tracker, set a prompt on field TranDate, labeled: “Start Date”, expression >=,
  3. Now add the prompt for Calc_EndDate, labeled: “End Date”, expression <=

@ckrusen, Could you please share the correct WIP BAQ?

I didn’t finish it. But you should be able to from the BAQ I posted, and @aarong’s original SQL.

Or maybe @aarong will share it.

FTR - I have no idea that SQL aarong posted is general enough for any company, or if it is specific to his company’s use of E10

There is still something off in the logic that I just can’t figure out. Our WIP report differs on some jobs, but without any more detail it’s proving to be a bear…

EDIT: AHA! DMR is the culprit…

The BAQ and SQL query was tailored to our businesses needs we use a separate EOM database to allow capture of data for the finance team. I will upload the finished BAQ on Monday.

1 Like

I’m surprised that the sign of the transaction (based on the trantype) isn’t needed a lot more.

That’s what I’m used to in our last system. I just updated my SQL and I had 14 jobs (out of 2400) that were off. When I ran the WIP report again for one of those jobs it matches my query. I guess I need to verify when we’re not doing production :face_with_symbols_over_mouth:

Did you use your own SQL query?

What is the data returned based on the query I shared? If this ran in live it returns additional data if it’s not ran in EOM database.

This down to jobs being carried out. Hence the snapshot in time.

Here is the finished BAQ

TEAGLE-WIP-BAQ.baq (147.0 KB)

1 Like

Afternoon everyone,

I have a quick question.

I have this BAQ: TEAGLE-WIP-BAQ.baq (187.0 KB) I would like to find a way of determining what type of job they are…

(case when (SubQuery15.ProdGrup_Description like ‘Tuli’) then Tulip else NULL end) would this work?

for example.

Calculated_Field Job Number PartNum Rev ProdCode Tracked SerialNum ProdGrup_Description
Machine TED2214313 TED221 B 1400 True Blank
Tulip 837361 SX A 9000 False
PARTS 876333 SC1100 A 2400 False Blank

Would to have the calculated field find out what type it is and label it… :confused: This would be for a Pivot Table in Excel unless there is a better way.

Could we use if the ProdCode with different if statements e.g if 9000, 2400, 3500, 4005 then display Tulip if else then 3837, 9448, 2220 display Machine so on and so forth.

So SubQuery15 must contain the table ProdGroup. Just add a calculated field (with whatever expression you want) to that subquery. That field would then be visible in the top level query - assuming SubQuery15 is in the top level query. If it’s not just pass that value as a dsiplayed column from the subquery that Subquery15 is used in.

If your ProdCodes were:

ProdCode  Description
1400      Machine
2400      Tulip Widget
3387      Parts
3500      Tulip Wax
4005      Tulip Accessory
9000      Tulip Option

You could use
(case when ProdGrup.Description LIKE 'Tuli%' then 'Tulip' else null)
or
(case when ProdGrup.ProdCode IN ('2400', '3500', '4005', '9000') then 'Tulip' else null)

2 Likes

Can you have multiple in the same calculated field? or do they have to be separate calculations?