Unable to filter in power bi dax query

27 Views Asked by At

I have 3 tables - AWS,Troux and Url-shortener. Troux to Url-shortener has 1 to many relationship. Troux to AWS has 1 to many relationship. They all have UUID as common column. UUID is a text column, value is alphanumeric. I need to select the 1st value of UUID column from Url-shortener and get the same UUID from Troux table so that I can get the cost from AWS table for that UUID.

Coversion = 
VAR FirstUUID = FIRSTNONBLANK('Url-shortener'[UUID], 1)
VAR FilteredTroux = FILTER(Troux, Troux[UUID] = FirstUUID)

SUMMARIZE( FILTER(
        AWS,
        AWS[UUID] = FilteredTroux[UUID]
    )
      , AWS[UUID] 
      , Troux[Application] 
      , "Cost", AWS[AWS Cost] 
      )

But FilteredTroux[UUID] here UUID is showing error as "cannot find UUID". But if we write RETURN FilteredTroux then it showing the all columns including UUID. Please help.

I am expecting the same value of UUID as an output from Troux table which I collect from Url-shortener table. Using DAX.

1

There are 1 best solutions below

11
davidebacci On

Does this work?

Coversion = 
VAR FirstUUID = FIRSTNONBLANK('Url-shortener'[UUID], 1)
VAR FilteredTroux = FILTER(Troux, Troux[UUID] = FirstUUID)
RETURN SELECTCOLUMNS(FilteredTroux, "Column", [UUID])