Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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>]…)
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
49 | |
26 | |
21 | |
16 | |
12 |
User | Count |
---|---|
57 | |
49 | |
44 | |
19 | |
18 |