March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hi guys, any help to the above switch column is highly appreciable. I am dealing with two calculated columns which you can see on the right side of image, one is Digital and another one is NonDigital. Digital column is created using the following dax:
@maheshbabu ,
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.
try if this can help
New column =
SWITCH (
TRUE (),
ISBLANK ( Communications[NonDigital] ), "Digital",
ISBLANK ( Communications[Digital] ), "Non-Digital",
Communications[Digital] < Communications[NonDigital], "Digital",
Communications[Digital] > Communications[NonDigital], "Non-Digital",
Communications[Digital] = Communications[NonDigital], BLANK (),
Communications[Digital] >= 0 && Communications[NonDigital] < 0, "Digital",
Communications[Digital] < 0 && Communications[NonDigital] >= 0, "Non-Digital",
Communications[Digital] = 0 && Communications[NonDigital] <> 0, "Digital",
Communications[Digital] <> 0 && Communications[NonDigital] = 0, "Non-Digital",
Communications[Digital] = 0 && Communications[NonDigital] >= 0, "Digital",
Communications[NonDigital] = 0 && Communications[Digital] >= 0, "Non-Digital",
Communications[Digital] = BLANK () && Communications[NonDigital] >= 0, "Non-Digital",
Communications[NonDigital] = BLANK () && Communications[Digital] >= 0, "Digital",
BLANK ()
)
Hi Amit,
I have tried the DAX that you provided, but in vain. Here I am pasting the desired output. I hope it is sufficient. Let us know if not suffice.
I have taken some random numbers to make you understand, feel free to ask anything you don't understand. Thanks
Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
User | Count |
---|---|
93 | |
91 | |
90 | |
80 | |
49 |
User | Count |
---|---|
160 | |
145 | |
103 | |
72 | |
55 |