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!
I need a help on my DAX Query. Below is my query that I'm using on a Tabular Model to pull Cost Center data. It's working perfectly.
EVALUATE (
DISTINCT(
FILTER(
SELECTCOLUMNS(
'dimensionCostCenter',
"Cost Center Code",'dimensionCostCenter'[Cost Center Code],
"Cost Center Name",'dimensionCostCenter'[Cost Center Name],
"Division Name",'dimensionCostCenter'[Division Name],
"Profit Center",'dimensionCostCenter'[Profit Center],
"Cost Center Roll Up L1 Name",'dimensionCostCenter'[Cost Center Roll Up L1 Name])
,NOT ([Cost Center Code]) IN {"211189","211193"})
)
)
My challenge is, somehow, to pull just one column, which would be the equivalent of a subselect in SQL.
I applied a pre-filter, to bring only the necessary codes. I'll still need to apply some more filters with the other columns, that's why I'm keeping these columns in the initial query.
But my expectation will be just bring in the "final select" only the Cost Center Code.
I appreciate your help!
SELECTCOLUMNS in DAX is a projection function, has nothing in common with SQL's subselect. www.dax.guide/selectcolumns
@rpereirait Just wrap another SELECTCOLUMNS statement around what you already have?
Hi @Greg_Deckler , I haven't tried a new SELECTCOLUMNS around what I'm already have yet, but I'll. Any ideas on what I could put in the table declaration, since the selectcolumns syntax asks me to do that? SELECTCOLUMNS(<table>, <name>, <scalar_expression> [, <name>, <scalar_expression>]…)
User | Count |
---|---|
12 | |
11 | |
8 | |
6 | |
6 |
User | Count |
---|---|
24 | |
19 | |
14 | |
10 | |
7 |