Forum Discussion

Amanda_Araujo's avatar
Amanda_Araujo
Frequent Visitor
3 years ago

Filter duplicated bars in the chart

I'm using a measure to create a basket analysis ranking and my problem is: the chart shows the same result twice, just by changing the order of products. Someone have any idea how can I filter it?

 

Here the code:

 

Ambos produtos = 
VAR InitialPurchase = VALUES(WooCommerce[CPF ANONIMO NEW])
VAR ComparisonPurchase = CALCULATETABLE(VALUES(WooCommerce[CPF ANONIMO NEW]), ALL('SKUs (2)'),
	TREATAS(VALUES('Comparação'[ID Produto (Woocommerce)]), WooCommerce[Id Produto]))

RETURN
IF ('@@@MEDIDASWOW'[@] = TRUE(),
	BLANK(),
		COUNTROWS(INTERSECT(InitialPurchase, ComparisonPurchase)))

 

2 Replies