Forum Discussion

TopHat's avatar
TopHat
Frequent Visitor
4 years ago

List string values in a matrix depending on different permutation

Hi all

 

Screenshot of the sample source data:

Sanitised sample data in usable format:

UserIDDayDiscountedHandsetFreeTrariffPhoneHasOrderedQuantitySale
11YYSamsungN00
21YNAppleN24566
31NNSamsungN00

 

 

I have a matrix made as below

 

Screenshot:

Sanitised sample data in usable format:

UserID12345
1SamsungSamsung NokiaNokiaSamsung
2AppleApplePixel PixelSamsung
3SamsungPixelNokia AppleNokia
4NokiaNokiaPixel PixelSamsung
5PixelAppleApple PixelApple
6SamsungPixelApple SamsungNokia
7AppleNokiaApple ApplePixel
8NokiaApplePixel NokiaNokia
9SamsungAppleApple AppleNokia
10PixelAppleSamsung AppleApple

 

 

The Days are across and Rows have UserID and Values are names of Phones:

 

 

I need a second table that displays the list of times a phone changed from one day to the next day by each user.

Additionally also need the number of times users have made each kind of change.

The comparison is only against the previous day.

 

 

The output I am after is (please note the table below is not complete):

 

Screenshot:

 

 

Sanitised sample data in usable format:

FromChanged ToIn DayHow many users
SamsungNokia31
NokiaSamsung51
ApplePixel32
PixelSamsung52
SamsungPixel22
NokiaApple41
AppleNokia52
NokiaPixel31

 

The model looks like the below:

 

You can find the file in the link below:

Like to pbi file 

 

 

Many thanks in advace.

 

 

 

13 Replies

  • Greg_Deckler's avatar
    Greg_Deckler
    Community Champion

    TopHat I fail to understand your numbers. For the first row in your table you have Samsung to Nokia day 3 and you have 3 users but only one switched on day 3 from Samsung to Nokia. So...