Supplies are limited. Contact info@espc.tech right away to save your spot before the conference sells out.
Get your discountScore big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount
1) I loaded a normalized table from SqlServer: KVH
With 9 columns: Date, Key0, Key1, Key2, Key3, Key4, Key5, Key6, Value
2) I created a virtual table KVH_vmxg
KVH.vmxg =
SELECTCOLUMNS(
SUMMARIZE(
FILTER(
ALL(KVH),
KVH[Key0] in { "VntMesImpGdLDZV", "VntMesPzsGdLDZV" }
),
KVH[Date],
KVH[Key1],
KVH[Key2],
KVH[Key3],
KVH[Key4],
"Year", YEAR( KVH[Date] ),
"AcmSls", ROUND( COALESCE(
CALCULATE(SUM(KVH[ValKpi]),
KVH[AbvKpi] = "VntMesImpGdLDZV"), 0 ), 2 ),
"AcmQty", ROUND( COALESCE(
CALCULATE(SUM(KVH[ValKpi]),
KVH[AbvKpi] = "VntMesPzsGdLDZV"), 0 ), 0 )
),
"KPI Date", [Date],
"Year", [Year],
"Quarter", "Q" & FORMAT( [Date], "\Qq" ),
"MonthNum", MONTH([Date]),
"Month", FORMAT( [Date], "MMMM" ),
"Line", [Key1],
"Country", [Key2],
"Zone", [Key3],
"Salesman", [Key4],
"Sales", [AcmSls],
"Quantity", [AcmQty]
)
3) Now I need to sumarize KVH_vmxg virtual table by Year
CMP.vaaitaccmp =
ADDCOLUMNS(
SUMMARIZE(
KVH.vmxg,
[Year] // The syntax for [Year] is incorrect
),
"Total Ventas",
CALCULATE(
SUMX(
FILTER(KVH.vmxg,
[Year] = KVH.vmxg[Year]
),
KVH.vmxg[Sales]
)
),
"Last Year Sales",
CALCULATE(
SUMX(
FILTER(KVH.vmxg,
[Year] = KVH.vmxg[Year] - 1
),
KVH.vmxg[Sales]
)
)
)
4) Even with ChatGTP, I still getting syntax error.
Can PowerBI create summarization tables from virtual tables?
Solved! Go to Solution.
A virtual table lives inside a definition for a measure (mostly) . Your KVH.vmxg seems to be a regular calculated table.
Other than that, yes.
btw Ibendilin, thank you for your clarification about table nomenclature.
A virtual table lives inside a definition for a measure (mostly) . Your KVH.vmxg seems to be a regular calculated table.
Other than that, yes.