Forum Discussion

Birinder's avatar
Birinder
Helper III
4 years ago
Solved

How to create a conditional column through measures ?

Hi there,  I hope you all are doing good,   Actually I am working on a Live data connected to Azure servers. Instead of importing it, I am working lively with it. But I need to create an extra fie...
  • Anonymous's avatar
    Anonymous
    4 years ago

    Hi Birinder ,

    It seems that you are connecting to Azure servers in live connection mode, in which case you cannot create calculated column, but only report-level measures. You can learn more about live connection by reviewing the following blog.

    Live Connection; When Power BI comes Hybrid

    You can create a table visual and put all these fields(Roll 5,Roll v,EVM_ROLL and IS&BS Amountin the Values options of table visual. Note that you should not use any aggregation functions for the value fields(like the field IS&BS Amount) as shown below screenshot. Also, you can create a measure as follows to get the ”desired column".

    DESIRED SOLUTION = 
    IF (
        SELECTEDVALUE ( 'Table'[Roll 5] ) = 1110
            && SELECTEDVALUE ( 'Table'[Roll v] ) = "Opening Balance"
            && SELECTEDVALUE ( 'Table'[EVM_ROLL] ) = "R110",
        SELECTEDVALUE ( 'Table'[IS&BS Amount] ),
        0
    )

    Best Regards