Forum Discussion

noneother's avatar
noneother
Frequent Visitor
4 years ago

Using a DAX measure in a table visualisation to return the same scalar value in a new column

Hello

 

I want to use a DAX measure (not a calculated column) as a fourth column (outlined in red, below) within a table visualisation. 

However, my DAX only returns the single row:

 

DAX = 
VAR varStatusGroup = "Final"
VAR varStatus = "Disposed"

RETURN 
CALCULATE (
    MIN('Status'[Status])
    ,KEEPFILTERS('Status'[Status group] = varStatusGroup)
    ,KEEPFILTERS('Status'[Status] = varStatus)
)

What am I doing wrong?

 

I want:

Data model:

4 Replies

  • smpa01's avatar
    smpa01
    Icon for Community Champion rankCommunity Champion

    noneother  does this work?

    CALCULATE (
        MIN('Status'[Status])
        ,'Status'[Status group] = "Final"
        ,'Status'[Status] = "Disposed"
    )
    • noneother's avatar
      noneother
      Frequent Visitor

      That works but I introduces redundant rows, creating way more than the original 5 rows for Type ID: AEG3ML

  • Hi noneother 

     

    Based on your post and dax you shared, you want to show "Disposed" in the fourth column, so if I got it correctly, try this:

    DAX = 
    "Disposed"

     

     

    Otherwise, can you please add more details?

     

    If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
    Appreciate your Kudos!!
    LinkedIn: 
    www.linkedin.com/in/vahid-dm/