Forum Discussion
ENGINEERING PROGRESS GRAPH
- Anonymous3 years ago
Hi cstamp76 ,
Here are the steps you can follow:
1. Select the 6 columns – Transform – Unpivot Columns.
2. Create calculated column.
Table1 = VAR _COLUMN= {"HISTO","LINE"} VAR _TABLE1= DISTINCT('Table'[Attribute]) RETURN CROSSJOIN( _TABLE1,_COLUMN)3. Create calculated column.
Sep - 22 = SWITCH( TRUE(), 'Table1'[Value]="HISTO", SUMX( FILTER(ALL('Table'), 'Table'[Attribute]='Table1'[Attribute]&& YEAR('Table'[Value])=2022&&MONTH('Table'[Value])=9),[QTY(TONS)]), 'Table1'[Value]="LINE", SUMX( FILTER(ALL('Table'), 'Table'[Attribute]=EARLIER('Table1'[Attribute])&& 'Table'[Value]<=EOMONTH(DATE(2022,9,1),0)),[QTY(TONS)]))Oct - 22 = SWITCH( TRUE(), 'Table1'[Value]="HISTO", SUMX( FILTER(ALL('Table'), 'Table'[Attribute]='Table1'[Attribute]&& YEAR('Table'[Value])=2022&&MONTH('Table'[Value])=10),[QTY(TONS)]), 'Table1'[Value]="LINE", SUMX( FILTER(ALL('Table'), 'Table'[Attribute]=EARLIER('Table1'[Attribute])&& 'Table'[Value]<=EOMONTH(DATE(2022,10,1),0)),[QTY(TONS)]))Nov - 22 = SWITCH( TRUE(), 'Table1'[Value]="HISTO", SUMX( FILTER(ALL('Table'), 'Table'[Attribute]='Table1'[Attribute]&& YEAR('Table'[Value])=2022&&MONTH('Table'[Value])=11),[QTY(TONS)]), 'Table1'[Value]="LINE", SUMX( FILTER(ALL('Table'), 'Table'[Attribute]=EARLIER('Table1'[Attribute])&& 'Table'[Value]<=EOMONTH(DATE(2022,11,1),0)),[QTY(TONS)]))4. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi cstamp76 ,
Here are the steps you can follow:
1. Select the 6 columns – Transform – Unpivot Columns.
2. Create calculated column.
Table1 =
VAR _COLUMN=
{"HISTO","LINE"}
VAR _TABLE1=
DISTINCT('Table'[Attribute])
RETURN
CROSSJOIN(
_TABLE1,_COLUMN)
3. Create calculated column.
Sep - 22 =
SWITCH(
TRUE(),
'Table1'[Value]="HISTO",
SUMX(
FILTER(ALL('Table'),
'Table'[Attribute]='Table1'[Attribute]&& YEAR('Table'[Value])=2022&&MONTH('Table'[Value])=9),[QTY(TONS)]),
'Table1'[Value]="LINE",
SUMX(
FILTER(ALL('Table'),
'Table'[Attribute]=EARLIER('Table1'[Attribute])&& 'Table'[Value]<=EOMONTH(DATE(2022,9,1),0)),[QTY(TONS)]))Oct - 22 =
SWITCH(
TRUE(),
'Table1'[Value]="HISTO",
SUMX(
FILTER(ALL('Table'),
'Table'[Attribute]='Table1'[Attribute]&& YEAR('Table'[Value])=2022&&MONTH('Table'[Value])=10),[QTY(TONS)]),
'Table1'[Value]="LINE",
SUMX(
FILTER(ALL('Table'),
'Table'[Attribute]=EARLIER('Table1'[Attribute])&& 'Table'[Value]<=EOMONTH(DATE(2022,10,1),0)),[QTY(TONS)]))Nov - 22 =
SWITCH(
TRUE(),
'Table1'[Value]="HISTO",
SUMX(
FILTER(ALL('Table'),
'Table'[Attribute]='Table1'[Attribute]&& YEAR('Table'[Value])=2022&&MONTH('Table'[Value])=11),[QTY(TONS)]),
'Table1'[Value]="LINE",
SUMX(
FILTER(ALL('Table'),
'Table'[Attribute]=EARLIER('Table1'[Attribute])&& 'Table'[Value]<=EOMONTH(DATE(2022,11,1),0)),[QTY(TONS)]))
4. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
hello Anonymous thank you for your reply.
i will definitly try your solution. one thing probably misleading in my original table.
the column "Graph" in the final summary table was not actually referring to any values. that was intended to clarify the type of graph I would like to use for progress tracking
so the values to be shown in the graph are those under the column "ISSUES" - 1st SUBMISSION Planned monthly, 1st SUBMISSION forecast monthly, 1st SUBMISSION actual monthly etc.
thank you very much!