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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
LuciaS1
Regular Visitor

Cross selling matrix %

Hi!

I have created this cross selling matrix by this code 

Nakup_prod_porov =
VAR Nakup= VALUES(Data_2022[Unique])
VAR Porovnanie_S = CALCULATETABLE(VALUES(Data_2022[Unique]), ALL('Tovarové skupiny'),
                        TREATAS(VALUES('Analýza správania zákazníkov'[Kód]), Data_2022[Tovarová skupina]) )
RETURN
    IF(SELECTEDVALUE('Tovarové skupiny'[Názov])= SELECTEDVALUE('Analýza správania zákazníkov'[Názov]),
        BLANK(),
            COUNTROWS(INTERSECT( Nakup, Porovnanie_S)))
LuciaS1_0-1680369755733.png

I want to make percentage matrix but this code doesn t work right.  

%Percent_Nakup_Skup =
VAR Nakup = VALUES(Data_2022[Unique])
VAR Porovnanie_S = CALCULATETABLE(VALUES(Data_2022[Unique]), ALL('Tovarové skupiny'),
                        TREATAS(VALUES('Analýza správania zákazníkov'[Kód]), Data_2022[Tovarová skupina]))
VAR Pocet_Spolu = [Pocet_nakupov]
RETURN
    IF(SELECTEDVALUE('Tovarové skupiny'[Názov]) = SELECTEDVALUE('Analýza správania zákazníkov'[Názov]),
        BLANK(),
        DIVIDE(COUNTROWS(INTERSECT(Nakup, Porovnanie_S)), Pocet_Spolu) )
LuciaS1_1-1680369868349.png

There are different percentage values on same products so that not right. 

Is there some way to calculate percentage cross selling matrix

 

Thak you !

1 REPLY 1
Ashish_Mathur
Super User
Super User

Hi,

Share some data, explain the question and show the expected result.  If possible, please ensure column/table names are in English.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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