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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
tksnota
Post Patron
Post Patron

NULL assigned unique individual values

Hi,

 

Is it possible to the activity mentioned in the subject instead of making all null with single and similar value?

 

Thanks...tksnota

2 ACCEPTED SOLUTIONS
SamWiseOwl
Super User
Super User

Hi @tksnota 

 

I have in the passed replaced NULLs using the INDEX feature.

In the Query editor | Add Columns | Index from then enter the MAX index you have.

SamWiseOwl_0-1731513836899.png

 

I then said if the Original ID is null use the new id else use the original id.

Delete the old ID and rename this column.

SamWiseOwl_1-1731513939282.png

 


If you are happy with this answer please mark as a solution for others to find !

Kudos are always appreciated! Check out our free Power BI video courses.

View solution in original post

Anonymous
Not applicable

Hi @tksnota ,

 

It can be done both ways.

 

M code.

if [Entry No] = null and [PO] = 116557 and [Creditor Name] = "Advanced Travel Partners UK Ltd" and [Creditor Code] = 410229 and [transtype] = "B"
then "N"
else [transtype]

vkaiyuemsft_0-1731656902639.png

 

DAX.

Column =
IF (
    'Table'[Entry No] = BLANK ()
        && 'Table'[PO] = 116557
        && 'Table'[Creditor Name] = "Advanced Travel Partners UK Ltd"
        && 'Table'[Creditor Code] = 410229
        && 'Table'[transtype] = "B",
    "N",
    'Table'[transtype]
)

 

vkaiyuemsft_1-1731656982792.png

 

If your Current Period does not refer to this, please clarify in a follow-up reply.

 

Best Regards,

Clara Gong

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

View solution in original post

5 REPLIES 5
Anonymous
Not applicable

Hi @tksnota ,

 

It can be done both ways.

 

M code.

if [Entry No] = null and [PO] = 116557 and [Creditor Name] = "Advanced Travel Partners UK Ltd" and [Creditor Code] = 410229 and [transtype] = "B"
then "N"
else [transtype]

vkaiyuemsft_0-1731656902639.png

 

DAX.

Column =
IF (
    'Table'[Entry No] = BLANK ()
        && 'Table'[PO] = 116557
        && 'Table'[Creditor Name] = "Advanced Travel Partners UK Ltd"
        && 'Table'[Creditor Code] = 410229
        && 'Table'[transtype] = "B",
    "N",
    'Table'[transtype]
)

 

vkaiyuemsft_1-1731656982792.png

 

If your Current Period does not refer to this, please clarify in a follow-up reply.

 

Best Regards,

Clara Gong

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

Anonymous
Not applicable

Hi @tksnota ,

 

If you are trying to convert transtype data with null value of Entry_No and transtype value of “B” to “N”, you can try to create a custom column in power query editor and write the following expression. 

vkaiyuemsft_0-1731550532743.png

if [Entry_No] = null and [transtype] = "B"
then "N"
else [transtype]

vkaiyuemsft_1-1731550552336.png

 

If this is not the result you are expecting, please let me know more in the form of screenshot or dummy table so that we can better help you to solve the problem.

 

Best Regards,

Clara Gong

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

 

 

Hi,

 

this is great! I can use the m code for the null values and transtype

 

My other concern is for specific value. Can it be done where in if entry = null, PO has specific value (116557), Creditor Name has specifi value (Advance Travel) and Creditor Code has specific value (410229) then change transtype from B to N. 

 

Happy to do it for M Code or Dax?

 

Thanks...tksnota...

 

 

SamWiseOwl
Super User
Super User

Hi @tksnota 

 

I have in the passed replaced NULLs using the INDEX feature.

In the Query editor | Add Columns | Index from then enter the MAX index you have.

SamWiseOwl_0-1731513836899.png

 

I then said if the Original ID is null use the new id else use the original id.

Delete the old ID and rename this column.

SamWiseOwl_1-1731513939282.png

 


If you are happy with this answer please mark as a solution for others to find !

Kudos are always appreciated! Check out our free Power BI video courses.

thanks...will the index feature work also for this scenario wherein i have thousand of line items with transtype "B" but I only need to change this couple to lines to "N"

 

 

tksnota_1-1731540736254.png

 

 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.