Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
prudhvi_kumar
New Member

Logical DAX Expressions

table A

ABCD
TruefalseTruefalse

 

More than 100 columns i have like this, where True , False are there i need "yes" or "no" over there.Without create new columns is it possible to create any measure for the same.

7 REPLIES 7
Aburar_123
Solution Supplier
Solution Supplier

Hi @prudhvi_kumar ,

 

Please use the Power Query Transformation as below,

 

Aburar_123_0-1646896974784.png

Select Row No column then Go to Transform widow -> Unpivot Column -> Unpivot Other Columns

Aburar_123_1-1646897186483.png

it will give you the result as below,

Aburar_123_2-1646897341212.png

 

Then, Go to Add Column -> Custom Column options and write the below,

Aburar_123_3-1646897438559.png

and get the result as below,

Aburar_123_5-1646897621709.png

 

 

In the visual pane you can create the Matrix visual as below,

 

Aburar_123_6-1646897670960.png

 

If this post helps, then please Accept this as the solution. Thanks

 

 

v-chenwuz-msft
Community Support
Community Support

Hi @prudhvi_kumar ,

 

It seems no way to create a "Logical DAX" and only one by one. However, use unpivot other columns in power query to let these columns into one column, then use DAX to get the result.

vchenwuzmsft_0-1646894781297.png

 

By the way, can you share what you will do after get the result. There may be ways to bypass the need to create similar measures to get the results you want directly.

 

Best Regards

Community Support Team _ chenwu zhu

 

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

mwegener
Most Valuable Professional
Most Valuable Professional

Hi @prudhvi_kumar ,

 

can you customize the data type and custom format?

BooleanDAX2.png

Did I answer your question?
Please mark my post as solution, this will also help others.
Please give Kudos for support.

Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast - Power BI Tutorials


johnt75
Super User
Super User

Can you use power query instead of DAX? You could transform the data during load changing TRUE to Yes and FALSE to No.

Hi @johnt75 

 

I Agree. But i have 100 columns. when i use DAX 100 extra columns will create over there(through using SWITCH/IF) is there any other option to write mesuare for all togather in one shot?

mwegener
Most Valuable Professional
Most Valuable Professional

Hi @prudhvi_kumar 

 

do you mean something like this?

Col A = IF(CONTAINS('Table A','Table A'[A], TRUE()),"yes","no")  

 

Did I answer your question?
Please mark my post as solution, this will also help others.
Please give Kudos for support.

Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast - Power BI Tutorials


hi @mwegener 

 

I Agree. But i have 100 columns. when i use DAX 100 extra columns will create over there(through using SWITCH/IF) is there any other option to write mesuare for all togather in one shot?

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.