Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
Hi All,
I have a data set that looks something like this:
| Minimum | Maximum |
| 1 | |
| 5 | |
| 3 | 6 |
| 7 | |
| 2 | 4 |
I want to create a new column in DAX so that the data will look something like this:
| Minimum | Maximum | New Column |
| 1 | >=1 | |
| 5 | >=5 | |
| 3 | 6 | 3<=>6 |
| 7 | <=7 | |
| 2 | 4 | 2<=>4 |
Is there any way to do this in DAX using a formula? Need help with it. Thanks a lot for the help.
Solved! Go to Solution.
Hi @Anonymous
New column =
SWITCH (
TRUE (),
NOT ISBLANK ( Table1[Minimum] ) && NOT ISBLANK ( Table1[Maximum] ),
Table1[Minimum] & "<=>" & Table1[Maximum],
NOT ISBLANK ( Table1[Minimum] ), ">=" & Table1[Minimum],
NOT ISBLANK ( Table1[Maximum] ), "<=" & Table1[Maximum]
)
Please mark the question solved when done and consider giving a thumbs up if posts are helpful.
Contact me privately for support with any larger-scale BI needs, tutoring, etc.
Cheers
@Anonymous , Create a new column like
Switch( true(),
isblank([Maximum]) , ">=" & [Minimum] ,
isblank([Minimum]) , "<=" & [Maximum] ,
[Minimum] & "<=>" & [Maximum]
)
Hi @Anonymous
New column =
SWITCH (
TRUE (),
NOT ISBLANK ( Table1[Minimum] ) && NOT ISBLANK ( Table1[Maximum] ),
Table1[Minimum] & "<=>" & Table1[Maximum],
NOT ISBLANK ( Table1[Minimum] ), ">=" & Table1[Minimum],
NOT ISBLANK ( Table1[Maximum] ), "<=" & Table1[Maximum]
)
Please mark the question solved when done and consider giving a thumbs up if posts are helpful.
Contact me privately for support with any larger-scale BI needs, tutoring, etc.
Cheers
Hi,
You can use those functions to do the trick.
IF or SWITCH functions to test
ISBLANK([mini]) and ISBLANK([maxi]) to check if you have a value or not.
and finaly CONCATENATE (or uing &) with ">=" and "<=" symbols.
Hope it helps
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 48 | |
| 45 | |
| 41 | |
| 20 | |
| 17 |
| User | Count |
|---|---|
| 69 | |
| 63 | |
| 32 | |
| 31 | |
| 25 |