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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
TechR21
Helper V
Helper V

calculating a value based on other column

I have the following data

 

TechR21_0-1668778448408.png

 

a ticketnumber has an id in the ticketdetails table. This id is linked with the table tickets. A ticket has a majorticketid, or is blank (when there is no major ticket assigned).

 

When there is a majorticket assigned, this also has a ticketnumber in the table ticketdetails.

 

Now i need to be able to create a column ticketdetails table, that basically says;

when ticket.majorticketid is not empty then ticketdetailsticketnumber, otherwise blank

 

both tables are linked via ticketid, one on one relationship.

 

 

3 REPLIES 3
amitchandak
Super User
Super User

@TechR21 , A new column in ticketdetails

 

related(ticket[majorticketid])

 

refer 4 ways to copy data from one table to another
https://www.youtube.com/watch?v=Wu1mWxR23jU
https://www.youtube.com/watch?v=czNHt7UXIe8

I dont need the majorticketid, I need the ticketdetailsticketnumber when majorticketid is not empty

@TechR21 , In the tickets table , assuming both are joined

 

maxx(relatedtable(ticketdetails),[ticketdetailsticketnumber])

 

else add filter

 

maxx(filter(ticketdetails,ticketdetails[ticket id] = tickets[ticket id]) , ticketdetails[ticketdetailsticketnumber])

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.