Forum Discussion
Access column from Table store in variable
- 4 years ago
Hey Ali123 ,
it doens't really work like that with variables. You cannot just replace a table with a variable and access the column.
In general the following approach shoud work:
Category = DISTINCT ( SELECTCOLUMNS ( FILTER ( telecom_customer_churn, telecom_customer_churn[churn Category] <> BLANK () ), "churn Category", [churn Category] ) )For filtering CALCUALTETABLE is the better choice compared to FILTER, so would even use the following approach:
Category = DISTINCT ( SELECTCOLUMNS ( CALCULATETABLE ( telecom_customer_churn, telecom_customer_churn[churn Category] <> BLANK () ), "churn Category", [churn Category] ) )If you need any help please let me know.
If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍
Best regards
Denis
Blog: WhatTheFact.bi
Follow me: twitter.com/DenSelimovic
Hey Ali123 ,
it doens't really work like that with variables. You cannot just replace a table with a variable and access the column.
In general the following approach shoud work:
Category =
DISTINCT (
SELECTCOLUMNS (
FILTER (
telecom_customer_churn,
telecom_customer_churn[churn Category] <> BLANK ()
),
"churn Category", [churn Category]
)
)
For filtering CALCUALTETABLE is the better choice compared to FILTER, so would even use the following approach:
Category =
DISTINCT (
SELECTCOLUMNS (
CALCULATETABLE (
telecom_customer_churn,
telecom_customer_churn[churn Category] <> BLANK ()
),
"churn Category", [churn Category]
)
)
If you need any help please let me know.
If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍
Best regards
Denis
Blog: WhatTheFact.bi
Follow me: twitter.com/DenSelimovic