Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!

Reply
Ali123
Frequent Visitor

Access column from Table store in variable

Use filter function for filtering data then i save it into one variable "newTable".
Now i want to access disitinct vlaues from one of column filter table but cannot access column form table store in variable.
How can i do this in single step?pbi.PNG

1 ACCEPTED SOLUTION
selimovd
Super User
Super User

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

View solution in original post

1 REPLY 1
selimovd
Super User
Super User

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

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! It's time to submit your entry.

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.