Forum Discussion

Power_Guy's avatar
Power_Guy
Frequent Visitor
2 years ago
Solved

Dax is not working

In this Actual field is  showing 'blank' but instead of showing blank I wanted to return 0 so to achiveing this i created a dax but it is not working  Actual = IF(     Issues[Actual Receipt]...
  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi Power_Guy 

     

    Since I don't know what your data looks like, I tested it using simple data. When using the same DAX as yours an error was reported

     

    A single value for column 'Actual Receipt' in table 'Issues' cannot be determined. This can happen when a measure formula refers to a column that contains many values without specifying an aggregation such as min, max, count, or sum to get a single result.

     

    this is because this DAX formula handles multiple rows of data without specifying how to aggregate them. Use the SUM function to aggregate the data:

     

    Actual = IF(
        SUM(Issues[Actual Receipt]) = BLANK() || SUM(Issues[Actual Receipt]) = 0,
        IF(
            SUM(Issues[Recommended Distribution]) = BLANK(),
            0,
            SUM(Issues[Recommended Distribution])
        ),
        SUM(Issues[Actual Receipt])
    )

     

     

     

    If this is not the problem you are experiencing, please provide some dummy data that maintains the same data structure and tell me how the fields used in your matrix visual are calculated.

     

     Best Regards,
    Jarvis Tang
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.