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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
JustNewbie
Helper I
Helper I

Need guidance on unpivot columns

Hi,

 

I have 2 table below. Currently One to many relationship. Reference number is unique in table 2.

But now if i unpivot column Approver1 & Approver2, my reference number in table 2 become duplicate not unique...and it will affect the one to many relationship. how do i solve this? 

 

(Reason why i want to unpivot the column Approver1 & Approver2 is to count who had approved the most payment reference.)

 

JustNewbie_1-1669117446645.png

 

thanks.

4 REPLIES 4
JustNewbie
Helper I
Helper I

Hi,

 

Anyone can help?

JustNewbie
Helper I
Helper I

Anyone can give me some advice?

My target is to calculate which approvers had approved how many documents here. Should i unpivot the columns or there's other options? I also need to calculate dates from 2 diff tables.

johnt75
Super User
Super User

You could set it up as a many-to-many relationship but make it single directional, so that Table 2 filters Table 1.

@johnt75 hi, john, i make it single directional, but it give me another problem. I wan to calculate the datediff between the 2 tables, after i unpivot the column which become many to many relationship, the datediff in Dax doesn't work anymore.

 

Should create a separate table to unpivot the columns? Any ideas?

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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