cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
sanjay009
Helper III
Helper III

replace numbers to yes and No

I have data as below. want to replace the 0 to No and any number to Yes

 

IDType1Type2
A000123
A000214
A000306
A0004120

 

Thanks you

1 ACCEPTED SOLUTION
V-lianl-msft
Community Support
Community Support

Hi @sanjay009 ,

 

Try to select "ID" column and unpivot other column.

V-lianl-msft_0-1612945302104.png

 

Then create a measure and show it in matrix visual.

V-lianl-msft_2-1612945331931.png

 

 

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

View solution in original post

6 REPLIES 6
V-lianl-msft
Community Support
Community Support

Hi @sanjay009 ,

 

Try to select "ID" column and unpivot other column.

V-lianl-msft_0-1612945302104.png

 

Then create a measure and show it in matrix visual.

V-lianl-msft_2-1612945331931.png

 

 

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

View solution in original post

parry2k
Super User
Super User

@sanjay009 what you mean your column names are dynamic? Provide a bit more context. Your original question is answered by @Leonardo_DP 






Did I answer your question? Mark my post as a solution.

Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.





Column names will be changing every month. In below  repsonse how i use this ( is it a measure or Conditional column) 

 

if number = 0 then no else yes 

I think the best way without complicated formulas it's gonna be:
on power query select the id column (my guess is that's not gonna change) then select the option change other columns to lines, it's gonna create 2 columns, one with the type (name of the column) and other with the value.
then you can create a conditional column with the formula.

srry for language mistakes, it's not my first language.

Leonardo_DP
Frequent Visitor

A simple if condition like if number = 0 then no else yes would work.

The column names are dynamic

Helpful resources

Announcements
2022 Release Wave 1 760x460.png

2022 Release Wave 1 Plan

Power Platform release plan for the 2022 release wave 1 describes all new features releasing from April 2022 through September 2022.

Power BI December 2021 Update_carousel 768x460.jpg

Check it Out!

Click here to read more about the December 2021 Updates!

Jan 2022 Dev Camp 768x460 copy.png

Power BI Dev Camp- January 27th, 2022

Mark your calendars and join us for our next Power BI Dev Camp!

Top Solution Authors