Forum Discussion

Kavya123's avatar
Kavya123
Helper III
5 years ago
Solved

DAX expression using specific field

Hi Everyone,   Please help me to write expression in DAX.   My current expression is Sum( Value) . I want to display the value based on specific field  Response Type.   For ex: 1.If Responsetyp...
  • josef78's avatar
    5 years ago

    Hi,

    maybe try another forum group, like DAX commands and tips, bacause this is related on onpremise report server deployment, but....

     

    ...if you need sum, it is measure, you must solve how aggregate multiple formats to single result ... you can try:

     

    if(HASONEVALUE([Responsetype]),format(SUM([Value]),FIRSTNONBLANK([Responsetype],1)),blank())

     

    it will format sum of coumun based on format string in another columns, and in case multiple formats (e.g. last total row in visualisation) is returned blank value. But maybe found better approach, I'm not DAX expert... 🙂