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
Hi admin,
I have an analysis service data model(production). the table structure is like the following:
WODim, WOFact, and CDim.
WOFact has a relationship with CDim based on the WOFact[SCKey] and CDim[CKey]
WOFact has a relationship with WODim based on the WOFact[WOKey] and WODim[WOKey] (2 direction ways)
WODim and CDim don't have a relationship
WODim has a column [WOTFGroup] containing the value ("Break Fix", "Delivery", "Other, "PM")
CDim has a column [TSC] containing employee names ("Colin Musser", "Tony Wiedman", " Colby Krenz", ...)
I want to create a Calculated column [AssignedTSC] in the WODim.
So I created a table-level data model with the same relationship as the analysis services data model in the Power BI desktop.
My DAX code:
AssignedTSC =
IF('WODim'[WOTFGroup]="Delivery","Collin Musser",
IF('WODim'[WOTFGroup]="PM","Tony Wiedman",
related('CDim'[TSC]) ))
The code works well in the database table model but doesn't work in the analysis services data model.
it seems there are some more strict policies of DAX in the analysis services data model.
Thank you for your help.
Warning message:
"The column 'Customer[TechServiceCoordinator]' either doesn't exist or doesn't have a relationship to any table available in the current context. "
Then once in Model pane chech whether the relation b/w WODim and Customer is present or not.
Hii, nce use following DAX expression
AssignedTSC =
VAR WOFact = CALCULATE( WOFact,
FILTER( WOFact,
WOFact[WOKey] = CURRENTROW(WODim)[WOKey]))
RETURN
IF(
CURRENTROW(WODim)[WOTFGroup] = "Delivery", "Collin Musser",
IF( CURRENTROW(WODim)[WOTFGroup] = "PM",
"Tony Wiedman",
WOFact[TSC]))
User | Count |
---|---|
13 | |
10 | |
8 | |
7 | |
5 |
User | Count |
---|---|
24 | |
16 | |
15 | |
10 | |
7 |