Reply
LuciaS1
Regular Visitor
Partially syndicated - Outbound

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

Syndicated - Outbound

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/
avatar user

Helpful resources

Announcements
March PBI video - carousel

Power BI Monthly Update - March 2025

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

March2025 Carousel

Fabric Community Update - March 2025

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

Top Solution Authors (Last Month)
Top Kudoed Authors (Last Month)