Forum Discussion
DAX FORMULA
- 1 year ago
Hello rabeeh
Here some Contents that might come in handy Check these outOPTION-1
--------
Using SPLIT Function (Available in Power Query)If you are working with Power Query (M language) instead of DAX, you can split the column directly using the SPLIT function:
In Power Query:Right-click on the column -> Split Column -> By Delimiter -> Choose : as the delimiter.
This will create two separate columns.And then apply condition to compair the max value and return the respective winner
OPTION-2
--------
Create a calculated column with DAX
#STATUS =
VAR _val = 'TABLEX'[SCORE]
VAR _base = FIND(":", _val, 1, LEN(_val))
VAR _left = VALUE(LEFT(_val, _base - 1))
VAR _right = VALUE(MID(_val, _base + 1, LEN(_val) - _base))RETURN
SWITCH(
TRUE(),
_left = _right, "DRAW",
_left > _right, "Left Winner " & _left,
_left < _right, "Right Winner " & _right,
BLANK()
)
Please Provide some demo data inorder to get your required results
Thanks & Regards...
Hello rabeeh
Here some Contents that might come in handy Check these out
OPTION-1
--------
Using SPLIT Function (Available in Power Query)
If you are working with Power Query (M language) instead of DAX, you can split the column directly using the SPLIT function:
In Power Query:
Right-click on the column -> Split Column -> By Delimiter -> Choose : as the delimiter.
This will create two separate columns.
And then apply condition to compair the max value and return the respective winner
OPTION-2
--------
Create a calculated column with DAX
#STATUS =
VAR _val = 'TABLEX'[SCORE]
VAR _base = FIND(":", _val, 1, LEN(_val))
VAR _left = VALUE(LEFT(_val, _base - 1))
VAR _right = VALUE(MID(_val, _base + 1, LEN(_val) - _base))
RETURN
SWITCH(
TRUE(),
_left = _right, "DRAW",
_left > _right, "Left Winner " & _left,
_left < _right, "Right Winner " & _right,
BLANK()
)
Please Provide some demo data inorder to get your required results
Thanks & Regards...
Thank you 👌its working!!